Skip to content

Commit

Permalink
Fix HA deprecations bruxy70#475
Browse files Browse the repository at this point in the history
async_forward_entry_setup deprecation fix
  • Loading branch information
DzejDzi89 committed Nov 20, 2024
1 parent fbc6894 commit 06ec93f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions custom_components/garbage_collection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
config_entry.add_update_listener(update_listener)
# Add sensor
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(
config_entry, const.SENSOR_PLATFORM
hass.config_entries.async_forward_entry_setups(
config_entry, [const.SENSOR_PLATFORM]
)
)
return True
Expand Down
4 changes: 2 additions & 2 deletions custom_components/garbage_collection/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ async def async_added_to_hass(self) -> None:
const.CALENDAR_PLATFORM
] = EntitiesCalendarData(self.hass)
_LOGGER.debug("Creating garbage_collection calendar")
await self.hass.config_entries.async_forward_entry_setup(
self.config_entry, const.CALENDAR_PLATFORM
await self.hass.config_entries.async_forward_entry_setups(
self.config_entry, [const.CALENDAR_PLATFORM]
)

self.hass.data[const.DOMAIN][const.CALENDAR_PLATFORM].add_entity(
Expand Down

0 comments on commit 06ec93f

Please sign in to comment.