From 0c4705914f66f2e24d5846ed49688d54e1e706f2 Mon Sep 17 00:00:00 2001 From: Ben McClure Date: Sun, 7 Jul 2024 19:40:33 -0400 Subject: [PATCH] Fix deprecated usage of async_forward_entry_setup (#46) * Call async_forward_entry_setups instead of async_forward_entry_setup to fix deprecated usage * Update python version in lint action * Fix deprecated usage of async_forward_entry_setup --- custom_components/chore_helper/chore.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_components/chore_helper/chore.py b/custom_components/chore_helper/chore.py index b6e6375..48d5197 100644 --- a/custom_components/chore_helper/chore.py +++ b/custom_components/chore_helper/chore.py @@ -19,6 +19,8 @@ from .const import LOGGER from .calendar import EntitiesCalendarData +PLATFORMS: list[str] = [const.CALENDAR_PLATFORM] + class Chore(RestoreEntity): """Chore Sensor class.""" @@ -139,8 +141,8 @@ async def async_added_to_hass(self) -> None: EntitiesCalendarData(self.hass) ) LOGGER.debug("Creating chore 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, PLATFORMS ) self.hass.data[const.DOMAIN][const.CALENDAR_PLATFORM].add_entity(