Skip to content

Commit a9867f2

Browse files
author
niceboy
committed
Fix: light can not be turn on.
1 parent 8dad19e commit a9867f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

custom_components/aqara_gateway/light.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def turn_on(self, **kwargs):
192192
x_val, y_val = color_util.color_RGB_to_xy(*kwargs[ATTR_RGB_COLOR])
193193
payload[ATTR_RGB_COLOR] = int(x_val * 65535) * (2 ** 16) + int(y_val * 65535)
194194

195-
if len(payload) >= 1:
195+
if not payload:
196196
payload[self._attr] = 1
197197

198198
try:

custom_components/aqara_gateway/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"domain": "aqara_gateway",
33
"name": "Aqara Gateway",
44
"config_flow": true,
5-
"version": "0.3.1",
5+
"version": "0.3.2",
66
"zeroconf": ["_aqara._tcp.local.", "_aqara-setup._tcp.local."],
77
"documentation": "https://github.com/niceboygithub/AqaraGateway",
88
"issue_tracker": "https://github.com/niceboygithub/AqaraGateway/issues",

0 commit comments

Comments
 (0)