diff --git a/custom_components/versatile_thermostat/base_thermostat.py b/custom_components/versatile_thermostat/base_thermostat.py index 7438e5f5..8224c3b5 100644 --- a/custom_components/versatile_thermostat/base_thermostat.py +++ b/custom_components/versatile_thermostat/base_thermostat.py @@ -172,6 +172,7 @@ class BaseThermostat(ClimateEntity, RestoreEntity): "power_sensor_entity_id", "max_power_sensor_entity_id", "temperature_unit", + "is_device_active", } ) ) @@ -2178,6 +2179,7 @@ def update_custom_attributes(self): "power_sensor_entity_id": self._power_sensor_entity_id, "max_power_sensor_entity_id": self._max_power_sensor_entity_id, "temperature_unit": self.temperature_unit, + "is_device_active": self.is_device_active, } @callback diff --git a/custom_components/versatile_thermostat/thermostat_switch.py b/custom_components/versatile_thermostat/thermostat_switch.py index 43c3e594..ff8d5a07 100644 --- a/custom_components/versatile_thermostat/thermostat_switch.py +++ b/custom_components/versatile_thermostat/thermostat_switch.py @@ -30,6 +30,7 @@ class ThermostatOverSwitch(BaseThermostat): frozenset( { "is_over_switch", + "is_inversed", "underlying_switch_0", "underlying_switch_1", "underlying_switch_2", @@ -129,6 +130,7 @@ def update_custom_attributes(self): super().update_custom_attributes() self._attr_extra_state_attributes["is_over_switch"] = self.is_over_switch + self._attr_extra_state_attributes["is_inversed"] = self.is_inversed self._attr_extra_state_attributes["underlying_switch_0"] = self._underlyings[ 0 ].entity_id @@ -207,3 +209,4 @@ def _async_switch_changed(self, event): if old_state is None: self.hass.create_task(self._check_initial_state()) self.async_write_ha_state() + self.update_custom_attributes()