From b4a97ff94445174f2cb547b25b02837d82383d75 Mon Sep 17 00:00:00 2001 From: Giga77 <2777446+Giga77@users.noreply.github.com> Date: Fri, 29 Mar 2024 15:46:18 +0100 Subject: [PATCH] fix connection error --- custom_components/ecole_directe/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/ecole_directe/sensor.py b/custom_components/ecole_directe/sensor.py index d6825fd..6c5ec91 100644 --- a/custom_components/ecole_directe/sensor.py +++ b/custom_components/ecole_directe/sensor.py @@ -45,7 +45,7 @@ async def async_setup_entry( if ( coordinator.data is not None and "session" in coordinator.data - and "eleves" in coordinator.data["session"] + and coordinator.data["session"].eleves is not None ): for eleve in coordinator.data["session"].eleves: sensors.append(EDChildSensor(coordinator, eleve))