Compare commits
1 Commits
2.0.0.beta
...
2.0.0.beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
115df52f67 |
@@ -220,6 +220,8 @@ class VersatileThermostat(ClimateEntity, RestoreEntity):
|
|||||||
self._is_over_climate = False
|
self._is_over_climate = False
|
||||||
self._underlying_climate = None
|
self._underlying_climate = None
|
||||||
|
|
||||||
|
self._attr_translation_key = "versatile_thermostat"
|
||||||
|
|
||||||
self.post_init(entry_infos)
|
self.post_init(entry_infos)
|
||||||
|
|
||||||
def post_init(self, entry_infos):
|
def post_init(self, entry_infos):
|
||||||
@@ -864,11 +866,14 @@ class VersatileThermostat(ClimateEntity, RestoreEntity):
|
|||||||
@property
|
@property
|
||||||
def _is_device_active(self):
|
def _is_device_active(self):
|
||||||
"""If the toggleable device is currently active."""
|
"""If the toggleable device is currently active."""
|
||||||
if self._is_over_climate and self._underlying_climate:
|
if self._is_over_climate:
|
||||||
return self._underlying_climate.hvac_action not in [
|
if self._underlying_climate:
|
||||||
CURRENT_HVAC_IDLE,
|
return self._underlying_climate.hvac_action not in [
|
||||||
CURRENT_HVAC_OFF,
|
CURRENT_HVAC_IDLE,
|
||||||
]
|
CURRENT_HVAC_OFF,
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
return None
|
||||||
else:
|
else:
|
||||||
return self.hass.states.is_state(self._heater_entity_id, STATE_ON)
|
return self.hass.states.is_state(self._heater_entity_id, STATE_ON)
|
||||||
|
|
||||||
@@ -881,6 +886,9 @@ class VersatileThermostat(ClimateEntity, RestoreEntity):
|
|||||||
"""Set new target hvac mode."""
|
"""Set new target hvac mode."""
|
||||||
_LOGGER.info("%s - Set hvac mode: %s", self, hvac_mode)
|
_LOGGER.info("%s - Set hvac mode: %s", self, hvac_mode)
|
||||||
|
|
||||||
|
if hvac_mode is None:
|
||||||
|
return
|
||||||
|
|
||||||
if self._is_over_climate and self._underlying_climate:
|
if self._is_over_climate and self._underlying_climate:
|
||||||
data = {ATTR_ENTITY_ID: self._climate_entity_id, "hvac_mode": hvac_mode}
|
data = {ATTR_ENTITY_ID: self._climate_entity_id, "hvac_mode": hvac_mode}
|
||||||
await self.hass.services.async_call(
|
await self.hass.services.async_call(
|
||||||
|
|||||||
@@ -209,5 +209,17 @@
|
|||||||
"thermostat_over_climate": "Thermostat over another thermostat"
|
"thermostat_over_climate": "Thermostat over another thermostat"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"climate": {
|
||||||
|
"versatile_thermostat": {
|
||||||
|
"states_attributes": {
|
||||||
|
"preset_mode": {
|
||||||
|
"power": "Shedding",
|
||||||
|
"security": "Security"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,5 +209,17 @@
|
|||||||
"thermostat_over_climate": "Thermostat over another thermostat"
|
"thermostat_over_climate": "Thermostat over another thermostat"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"climate": {
|
||||||
|
"versatile_thermostat": {
|
||||||
|
"states_attributes": {
|
||||||
|
"preset_mode": {
|
||||||
|
"power": "Shedding",
|
||||||
|
"security": "Security"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,5 +209,17 @@
|
|||||||
"thermostat_over_climate": "Thermostat sur un autre thermostat"
|
"thermostat_over_climate": "Thermostat sur un autre thermostat"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"climate": {
|
||||||
|
"versatile_thermostat": {
|
||||||
|
"states_attributes": {
|
||||||
|
"preset_mode": {
|
||||||
|
"power": "Délestage",
|
||||||
|
"security": "Sécurité"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user