From a0b0b9068670755fc99c95a59e748e81768a85ec Mon Sep 17 00:00:00 2001 From: DewGew Date: Sat, 10 Feb 2024 19:26:10 +0100 Subject: [PATCH] Update domoticz.py --- modules/domoticz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/domoticz.py b/modules/domoticz.py index b3ad4d2..dd09a39 100644 --- a/modules/domoticz.py +++ b/modules/domoticz.py @@ -352,7 +352,7 @@ def getAog(device, user_id=None): } batteryLevel = device.get('BatteryLevel') - if domain not in ['Group', 'Scene'] and batteryLevel != 255: + if domain not in ['Group', 'Scene'] and batteryLevel is not None and batteryLevel != 255: aog.traits.append('action.devices.traits.EnergyStorage') aog.attributes['queryOnlyEnergyStorage'] = True aog.attributes['isRechargeable'] = False