FIX is_device_active flag
This commit is contained in:
@@ -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 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
|
||||
"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
|
||||
|
||||
@@ -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 @@ class ThermostatOverSwitch(BaseThermostat):
|
||||
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 @@ class ThermostatOverSwitch(BaseThermostat):
|
||||
if old_state is None:
|
||||
self.hass.create_task(self._check_initial_state())
|
||||
self.async_write_ha_state()
|
||||
self.update_custom_attributes()
|
||||
|
||||
Reference in New Issue
Block a user