Skip to content

Commit

Permalink
fix, ignore battery_state when is null
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmotea committed Mar 6, 2023
1 parent c4285fc commit 808477a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BridgeEmulator/HueObjects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@ def getDevicePower(self):
"power_state": {},
"type": "device_power"
}
if "battery" in self.config:
if "battery" in self.config and self.config["battery"]:
result["power_state"].update({"battery_level": self.config["battery"],
"battery_state": "normal"
})
Expand Down

0 comments on commit 808477a

Please sign in to comment.