Skip to content

Commit

Permalink
Send stream event on entertainment start
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusmotea authored Mar 17, 2023
1 parent c0f8f70 commit cfa33f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions BridgeEmulator/flaskUI/v2restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,15 @@ def put(self, resource, resourceid):
Thread(target=entertainmentService, args=[
object, authorisation["user"]]).start()
for light in object.lights:
light().state["mode"] = "streaming"
light().update_attr({"state": {"mode": "streaming"}})
sleep(1)
elif putDict["action"] == "stop":
logging.info("stop entertainment")
object.stream["active"] = False
for light in object.lights:
light().state["mode"] = "homeautomation"
light().update_attr({"state": {"mode": "homeautomation"}})
Popen(["killall", "openssl"])
object.update_attr(putDict)
elif resource == "scene":
if "recall" in putDict:
object.activate(putDict)
Expand Down

0 comments on commit cfa33f7

Please sign in to comment.