Skip to content

Commit

Permalink
Migrate to async_forward_entry_setups (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus authored Jun 27, 2024
1 parent 33341cf commit deb4db8
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions custom_components/healthchecksio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
)

MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=300)
PLATFORMS = [
Platform.BINARY_SENSOR,
]


async def async_setup(hass: core.HomeAssistant, config: ConfigType):
Expand Down Expand Up @@ -73,13 +76,7 @@ async def async_setup_entry(
hass, api_key, check, self_hosted, site_root, ping_endpoint
)

# Add binary_sensor
hass.async_add_job(
hass.config_entries.async_forward_entry_setup(
config_entry, Platform.BINARY_SENSOR
)
)

await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
return True


Expand Down

0 comments on commit deb4db8

Please sign in to comment.