From 232bdbd3f679e1e843a955a90483ac87a66e5f13 Mon Sep 17 00:00:00 2001 From: bruxy70 Date: Mon, 21 Nov 2022 08:07:26 +0100 Subject: [PATCH] #438 - reset state if date is not found --- custom_components/garbage_collection/sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/garbage_collection/sensor.py b/custom_components/garbage_collection/sensor.py index c769c4d..20de58c 100644 --- a/custom_components/garbage_collection/sensor.py +++ b/custom_components/garbage_collection/sensor.py @@ -465,6 +465,8 @@ def update_state(self) -> None: self._attr_icon = self._icon_tomorrow else: self._days = None + self._attr_state = None + self._attr_icon = None class WeeklyCollection(GarbageCollection):