Skip to content

Commit

Permalink
Merge pull request #4 from custom-components/main
Browse files Browse the repository at this point in the history
Migrate to async_forward_entry_setups (custom-components#51)
  • Loading branch information
Snuffy2 authored Jun 29, 2024
2 parents 33341cf + deb4db8 commit 40ad687
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 40ad687

Please sign in to comment.