diff --git a/custom_components/systemd_manager/manifest.json b/custom_components/systemd_manager/manifest.json index a792db1..80d2748 100644 --- a/custom_components/systemd_manager/manifest.json +++ b/custom_components/systemd_manager/manifest.json @@ -1,7 +1,7 @@ { "domain": "systemd_manager", "name": "Systemd Manager", - "version": "1.0.0", + "version": "1.1.0", "documentation": "https://github.com/dmamontov/hass-systemd-manager", "issue_tracker": "https://github.com/dmamontov/hass-systemd-manager/issues", "config_flow": true, diff --git a/custom_components/systemd_manager/switch.py b/custom_components/systemd_manager/switch.py index bcc106b..c62d8ed 100644 --- a/custom_components/systemd_manager/switch.py +++ b/custom_components/systemd_manager/switch.py @@ -89,7 +89,12 @@ async def async_added_to_hass(self) -> None: @callback def _schedule_immediate_update(self) -> None: - self.async_schedule_update_ha_state(True) + if ( + self._is_available != self.service.is_available + or self._is_on != self.service.is_on + or self._extra != self.service.extra + ): + self.async_schedule_update_ha_state(True) async def will_remove_from_hass(self) -> None: if self.unsub_update: