diff --git a/homeassistant/components/lutron_caseta/switch.py b/homeassistant/components/lutron_caseta/switch.py index e8f2d2e0f0b9..f1845b2ac120 100644 --- a/homeassistant/components/lutron_caseta/switch.py +++ b/homeassistant/components/lutron_caseta/switch.py @@ -98,7 +98,11 @@ class LutronCasetaSmartAwaySwitch(LutronCasetaEntity, SwitchEntity): async def async_added_to_hass(self) -> None: """Register callbacks.""" await super().async_added_to_hass() - self._smartbridge.add_smart_away_subscriber(self._handle_bridge_update) + self._smartbridge.add_smart_away_subscriber(self._handle_smart_away_update) + + def _handle_smart_away_update(self, smart_away_state: str | None = None) -> None: + """Handle updated smart away state from the bridge.""" + self.async_write_ha_state() async def async_turn_on(self, **kwargs: Any) -> None: """Turn Smart Away on.""" diff --git a/tests/components/lutron_caseta/__init__.py b/tests/components/lutron_caseta/__init__.py index 28738445fc65..9315c55bbd16 100644 --- a/tests/components/lutron_caseta/__init__.py +++ b/tests/components/lutron_caseta/__init__.py @@ -113,13 +113,13 @@ class MockBridge: """Activate smart away.""" self.smart_away_state = "Enabled" for callback in self._smart_away_subscribers: - callback() + callback(self.smart_away_state) async def _deactivate(self): """Deactivate smart away.""" self.smart_away_state = "Disabled" for callback in self._smart_away_subscribers: - callback() + callback(self.smart_away_state) async def connect(self): """Connect the mock bridge."""