Skip to content

Commit cfa33f7

Browse files
authored
Send stream event on entertainment start
1 parent c0f8f70 commit cfa33f7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

BridgeEmulator/flaskUI/v2restapi.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -518,14 +518,15 @@ def put(self, resource, resourceid):
518518
Thread(target=entertainmentService, args=[
519519
object, authorisation["user"]]).start()
520520
for light in object.lights:
521-
light().state["mode"] = "streaming"
521+
light().update_attr({"state": {"mode": "streaming"}})
522522
sleep(1)
523523
elif putDict["action"] == "stop":
524524
logging.info("stop entertainment")
525525
object.stream["active"] = False
526526
for light in object.lights:
527-
light().state["mode"] = "homeautomation"
527+
light().update_attr({"state": {"mode": "homeautomation"}})
528528
Popen(["killall", "openssl"])
529+
object.update_attr(putDict)
529530
elif resource == "scene":
530531
if "recall" in putDict:
531532
object.activate(putDict)

0 commit comments

Comments
 (0)