From 08fd1b6edd2d0559bc51db9933c8c8ef609bbe1c Mon Sep 17 00:00:00 2001 From: Ziver Koc Date: Sun, 29 Aug 2021 22:24:32 +0200 Subject: [PATCH] Another fix --- .../src/se/hal/plugin/assistant/google/SmartHomeImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hal-assistant-google/src/se/hal/plugin/assistant/google/SmartHomeImpl.java b/plugins/hal-assistant-google/src/se/hal/plugin/assistant/google/SmartHomeImpl.java index fb042e2a..c03c883f 100644 --- a/plugins/hal-assistant-google/src/se/hal/plugin/assistant/google/SmartHomeImpl.java +++ b/plugins/hal-assistant-google/src/se/hal/plugin/assistant/google/SmartHomeImpl.java @@ -200,7 +200,7 @@ public class SmartHomeImpl extends SmartHomeApp implements TokenRegistrationList DeviceTrait[] traits = DeviceTraitFactory.getTraits(device); Map deviceState = new HashMap<>(); - if (traits != null) { + if (traits.length > 0) { for (DeviceTrait trait : traits) { deviceState.putAll(trait.generateQueryResponse(device.getDeviceData())); }