diff --git a/custom_components/luxtronik/manifest.json b/custom_components/luxtronik/manifest.json index 387fb83..4f25b13 100644 --- a/custom_components/luxtronik/manifest.json +++ b/custom_components/luxtronik/manifest.json @@ -1,7 +1,7 @@ { "domain": "luxtronik2", "name": "Luxtronik", - "version": "2022.12.24", + "version": "2022.12.30", "integration_type": "hub", "config_flow": true, "iot_class": "local_polling", diff --git a/custom_components/luxtronik/sensor.py b/custom_components/luxtronik/sensor.py index ca30c6a..a6b3cde 100644 --- a/custom_components/luxtronik/sensor.py +++ b/custom_components/luxtronik/sensor.py @@ -877,7 +877,7 @@ def update(self): time_now = time(datetime.now().hour, datetime.now().minute) if self.native_value is not None and self._last_state is not None and self.native_value == LUX_STATUS_EVU and self._last_state != LUX_STATUS_EVU: # evu start - if self._first_evu_start_time is None or time_now.hour <= self._first_evu_start_time.hour or time_now.hour <= self._second_evu_start_time or time_now.hour <= self._first_evu_end_time.hour: + if self._first_evu_start_time is None or time_now.hour <= self._first_evu_start_time.hour or (self._second_evu_start_time is not None and time_now.hour <= self._second_evu_start_time.hour) or time_now.hour <= self._first_evu_end_time.hour: self._first_evu_start_time = time_now else: self._second_evu_start_time = time_now