Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MapoDan authored Jan 3, 2025
1 parent 439a255 commit d24fa40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/programmable_thermostat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ async def async_setup(hass, config):
_LOGGER.info("Set up of integration %s, version %s, in case of issue open ticket at %s", DOMAIN, VERSION, ISSUE_URL)
return True

async def async_setup_entry(hass, config_entry):
async def async_setup_entry(hass, config_entry: ConfigEntry):
"""Set up this integration using UI."""
if config_entry.source == config_entries.SOURCE_IMPORT:
# We get here if the integration is set up using YAML
hass.async_create_task(hass.config_entries.async_remove(config_entry.entry_id))
return True
undo_listener = config_entry.add_update_listener(update_listener)
_LOGGER.info("Added new ProgrammableThermostat entity, entry_id: %s", config_entry.entry_id)
hass.async_create_task(hass.config_entries.async_forward_entry_setup(config_entry, PLATFORM))
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORM)

return True

Expand Down

0 comments on commit d24fa40

Please sign in to comment.