diff --git a/homeassistant/components/guardian/__init__.py b/homeassistant/components/guardian/__init__.py index 29c7a9b455c..fdc82f14778 100644 --- a/homeassistant/components/guardian/__init__.py +++ b/homeassistant/components/guardian/__init__.py @@ -153,7 +153,7 @@ class PairedSensorManager: async def async_pair_sensor(self, uid: str) -> None: """Add a new paired sensor coordinator.""" - LOGGER.info("Adding paired sensor: %s", uid) + LOGGER.debug("Adding paired sensor: %s", uid) self._paired_uids.add(uid) @@ -202,7 +202,7 @@ class PairedSensorManager: async def async_unpair_sensor(self, uid: str) -> None: """Remove a paired sensor coordinator.""" - LOGGER.info("Removing paired sensor: %s", uid) + LOGGER.debug("Removing paired sensor: %s", uid) # Clear out objects related to this paired sensor: self._paired_uids.remove(uid) @@ -305,7 +305,6 @@ class PairedSensorEntity(GuardianEntity): async def async_added_to_hass(self) -> None: """Perform tasks when the entity is added.""" - await super().async_added_to_hass() self._async_update_from_latest_data() diff --git a/homeassistant/components/guardian/binary_sensor.py b/homeassistant/components/guardian/binary_sensor.py index 1abd92cd198..d8d0498304d 100644 --- a/homeassistant/components/guardian/binary_sensor.py +++ b/homeassistant/components/guardian/binary_sensor.py @@ -45,7 +45,8 @@ async def async_setup_entry( ) -> None: """Set up Guardian switches based on a config entry.""" - async def add_new_paired_sensor(uid: str) -> None: + @callback + def add_new_paired_sensor(uid: str) -> None: """Add a new paired sensor.""" coordinator = hass.data[DOMAIN][DATA_COORDINATOR][entry.entry_id][ API_SENSOR_PAIRED_SENSOR_STATUS diff --git a/homeassistant/components/guardian/sensor.py b/homeassistant/components/guardian/sensor.py index 520875823f5..160246b2014 100644 --- a/homeassistant/components/guardian/sensor.py +++ b/homeassistant/components/guardian/sensor.py @@ -49,7 +49,8 @@ async def async_setup_entry( ) -> None: """Set up Guardian switches based on a config entry.""" - async def add_new_paired_sensor(uid: str) -> None: + @callback + def add_new_paired_sensor(uid: str) -> None: """Add a new paired sensor.""" coordinator = hass.data[DOMAIN][DATA_COORDINATOR][entry.entry_id][ API_SENSOR_PAIRED_SENSOR_STATUS