diff --git a/custom_components/luxtronik/sensor.py b/custom_components/luxtronik/sensor.py index 335136c..163205e 100644 --- a/custom_components/luxtronik/sensor.py +++ b/custom_components/luxtronik/sensor.py @@ -396,8 +396,10 @@ def _calc_next_evu_event_minutes(self) -> int | None: return None evu_hours = (24 if evu_time < time_now else 0) + evu_time.hour weekday = datetime.today().weekday() - if not isinstance(self._attr_cache[SA.EVU_DAYS], list): - self._attr_cache[SA.EVU_DAYS] = list() + if isinstance(self._attr_cache[SA.EVU_DAYS], str): + self._attr_cache[SA.EVU_DAYS] = self._attr_cache[SA.EVU_DAYS].split(',') + elif not isinstance(self._attr_cache[SA.EVU_DAYS], list): + self._attr_cache[SA.EVU_DAYS] = list() evu_pause = 0 if not self._attr_cache[SA.EVU_DAYS] and weekday not in self._attr_cache[SA.EVU_DAYS]: evu_pause += (24 - datetime.now().hour)*60 - datetime.now().minute