Fix type issue in vicare integration (#101872)

* fix type issue

* fix type issue

* fix type issue

* extract from constructor

* Revert "extract from constructor"

This reverts commit a33de7ca8e75845b81c548c73745b15a98d2bd63.
This commit is contained in:
Christopher Fenner 2023-10-12 15:01:23 +02:00 committed by GitHub
parent 6e1c23906c
commit 5c52a15df7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -146,6 +146,7 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
_attr_max_temp = VICARE_TEMP_HEATING_MAX _attr_max_temp = VICARE_TEMP_HEATING_MAX
_attr_target_temperature_step = PRECISION_WHOLE _attr_target_temperature_step = PRECISION_WHOLE
_attr_preset_modes = list(HA_TO_VICARE_PRESET_HEATING) _attr_preset_modes = list(HA_TO_VICARE_PRESET_HEATING)
_current_action: bool | None = None
def __init__(self, name, api, circuit, device_config): def __init__(self, name, api, circuit, device_config):
"""Initialize the climate device.""" """Initialize the climate device."""
@ -153,10 +154,9 @@ class ViCareClimate(ViCareEntity, ClimateEntity):
self._attr_name = name self._attr_name = name
self._api = api self._api = api
self._circuit = circuit self._circuit = circuit
self._attributes = {} self._attributes: dict[str, Any] = {}
self._current_mode = None self._current_mode = None
self._current_program = None self._current_program = None
self._current_action = None
self._attr_unique_id = f"{device_config.getConfig().serial}-{circuit.id}" self._attr_unique_id = f"{device_config.getConfig().serial}-{circuit.id}"
def update(self) -> None: def update(self) -> None:

View File

@ -106,7 +106,7 @@ class ViCareWater(ViCareEntity, WaterHeaterEntity):
self._attr_name = name self._attr_name = name
self._api = api self._api = api
self._circuit = circuit self._circuit = circuit
self._attributes = {} self._attributes: dict[str, Any] = {}
self._current_mode = None self._current_mode = None
self._attr_unique_id = f"{device_config.getConfig().serial}-{circuit.id}" self._attr_unique_id = f"{device_config.getConfig().serial}-{circuit.id}"