Skip to content

Commit

Permalink
new fix #331
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmotea authored Aug 19, 2018
1 parent daa9a3a commit dc1cfe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BridgeEmulator/HueEmulator3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1578,11 +1578,11 @@ def do_PUT(self):
elif url_pices[4] == "0": #if group is 0 the scene applied to all lights
proxyDevices = {"deconz": False, "hue": False}
for light in bridge_config["lights"].keys():
if bridge_config["lights_address"][light]["protocol"] in ["deconz", "hue"]:
if bridge_config["lights_address"][light]["protocol"] in ["hue","deconz"]: #Original Hue light or Deconz light
if proxyDevices[bridge_config["lights_address"][light]["protocol"]] == False:
proxyDevices[bridge_config["lights_address"][light]["protocol"]] = True
url = "http://" + bridge_config["lights_address"][light]["ip"] + "/api/" + bridge_config["lights_address"][light]["username"] + "/groups/0/" + url_pices[5]
sendRequest(url, 'PUT', put_dictionary)
sendRequest(url, 'PUT', json.dumps(put_dictionary))
elif "virtual_light" not in bridge_config["alarm_config"] or light != bridge_config["alarm_config"]["virtual_light"]:
bridge_config["lights"][light]["state"].update(put_dictionary)
Thread(target=sendLightRequest, args=[light, put_dictionary]).start()
Expand Down

0 comments on commit dc1cfe2

Please sign in to comment.