Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions custom_components/panasonic_cc/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from aio_panasonic_comfort_cloud import ApiClient
from . import DOMAIN as PANASONIC_DOMAIN
from .const import (
KEY_DOMAIN,
CONF_FORCE_OUTSIDE_SENSOR,
CONF_ENABLE_DAILY_ENERGY_SENSOR,
DEFAULT_ENABLE_DAILY_ENERGY_SENSOR,
Expand Down Expand Up @@ -44,10 +43,9 @@ def async_get_options_flow(config_entry):

async def _create_entry(self, username, password):
"""Register new entry."""
# Check if ip already is registered
for entry in self._async_current_entries():
if entry.data[KEY_DOMAIN] == PANASONIC_DOMAIN:
return self.async_abort(reason="already_configured")
# _async_current_entries() already filters to this integration's domain.
if self._async_current_entries():
return self.async_abort(reason="already_configured")

return self.async_create_entry(title="", data={
CONF_USERNAME: username,
Expand Down