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))