Documentation (not finished)

This commit is contained in:
Jean-Marc Collin
2024-11-24 19:12:39 +00:00
parent 81780bd316
commit c090692adc
61 changed files with 1980 additions and 249 deletions

View File

@@ -52,10 +52,6 @@ class ThermostatOverClimateValve(ThermostatOverClimate):
"""Initialize the ThermostatOverClimateValve class"""
_LOGGER.debug("%s - creating a ThermostatOverClimateValve VTherm", name)
super().__init__(hass, unique_id, name, entry_infos)
# self._valve_open_percent: int = 0
# self._last_calculation_timestamp: datetime | None = None
# self._auto_regulation_dpercent: float | None = None
# self._auto_regulation_period_min: int | None = None
@overrides
def post_init(self, config_entry: ConfigData):
@@ -114,7 +110,8 @@ class ThermostatOverClimateValve(ThermostatOverClimate):
)
self._attr_extra_state_attributes["underlyings_valve_regulation"] = [
underlying.entity_id for underlying in self._underlyings_valve_regulation
underlying.valve_entity_ids
for underlying in self._underlyings_valve_regulation
]
self._attr_extra_state_attributes["on_percent"] = (

View File

@@ -1179,3 +1179,16 @@ class UnderlyingValveRegulation(UnderlyingValve):
return get_safe_float(self._hass, self._opening_degree_entity_id) > 0
except Exception: # pylint: disable=broad-exception-caught
return False
@property
def valve_entity_ids(self) -> [str]:
"""get an arrary with all entityd id of the valve"""
ret = []
for entity in [
self.opening_degree_entity_id,
self.closing_degree_entity_id,
self.offset_calibration_entity_id,
]:
if entity:
ret.append(entity)
return ret