Skip to content

Commit 369b96f

Browse files
authored
fix update sequence element #0 has length 1; 2 is required
1 parent cfa33f7 commit 369b96f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

BridgeEmulator/flaskUI/v2restapi.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -513,20 +513,18 @@ def put(self, resource, resourceid):
513513
if "action" in putDict:
514514
if putDict["action"] == "start":
515515
logging.info("start hue entertainment")
516-
object.stream.update(
517-
{"active": True, "owner": authorisation["user"].username, "proxymode": "auto", "proxynode": "/bridge"})
518516
Thread(target=entertainmentService, args=[
519517
object, authorisation["user"]]).start()
520518
for light in object.lights:
521519
light().update_attr({"state": {"mode": "streaming"}})
520+
object.update_attr({"stream": {"active": True, "owner": authorisation["user"].username, "proxymode": "auto", "proxynode": "/bridge"}})
522521
sleep(1)
523522
elif putDict["action"] == "stop":
524523
logging.info("stop entertainment")
525-
object.stream["active"] = False
526524
for light in object.lights:
527-
light().update_attr({"state": {"mode": "homeautomation"}})
525+
light().update_attr({"state": {"mode": "homeautomation"}})
528526
Popen(["killall", "openssl"])
529-
object.update_attr(putDict)
527+
object.update_attr({"stream": {"active": False}})
530528
elif resource == "scene":
531529
if "recall" in putDict:
532530
object.activate(putDict)

0 commit comments

Comments
 (0)