Skip to content

Commit

Permalink
Update domoticz.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Feb 10, 2024
1 parent 5606027 commit a0b0b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/domoticz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0b0b90

Please sign in to comment.