diff --git a/bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/dto/HomeData.java b/bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/dto/HomeData.java index 0a971c6b8..94bba8e54 100644 --- a/bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/dto/HomeData.java +++ b/bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/api/dto/HomeData.java @@ -39,14 +39,17 @@ public class HomeData extends NAThing implements NAModule, LocationEx { } public class Security extends HomeData { - private NAObjectMap persons = new NAObjectMap<>(); + private @Nullable NAObjectMap persons; public NAObjectMap getPersons() { - return persons; + NAObjectMap localPersons = persons; + return localPersons != null ? localPersons : new NAObjectMap<>(); } public List getKnownPersons() { - return persons.values().stream().filter(HomeDataPerson::isKnown).toList(); + NAObjectMap localPersons = persons; + return localPersons != null ? localPersons.values().stream().filter(HomeDataPerson::isKnown).toList() + : List.of(); } }