From 0cd75fddd5e425b1174228cc1c13daf432d43f38 Mon Sep 17 00:00:00 2001 From: magnuselden Date: Wed, 2 Aug 2023 21:11:43 +0200 Subject: [PATCH] fix typo --- custom_components/peaqnext/sensors/next_sensor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/peaqnext/sensors/next_sensor.py b/custom_components/peaqnext/sensors/next_sensor.py index 5ca4b4e..1d9d98e 100644 --- a/custom_components/peaqnext/sensors/next_sensor.py +++ b/custom_components/peaqnext/sensors/next_sensor.py @@ -97,6 +97,8 @@ def _make_string(self, model: HourModel) -> str: return f"{hours} {price}" def _make_hours_display(self, model: HourModel) -> str: + if model is None: + return "" tomorrow1: str = "" tomorrow2: str = "" if model.dt_start.day > datetime.now().day: