Suneman

Recast 11

Aug 28th, 2022
950
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.36 KB | None | 0 0
  1. [{"id":"b1c73d8845fa0a6f","type":"comment","z":"2720bad4b7ca5c26","name":"----------- Google Nest Kontor ----------- ","info":"","x":170,"y":20,"wires":[]},{"id":"844c35d3d022c1df","type":"comment","z":"2720bad4b7ca5c26","name":"---------- Settings ----------","info":"","x":130,"y":60,"wires":[]},{"id":"8c41d2e404aa2fc8","type":"change","z":"2720bad4b7ca5c26","name":"Flow settings","rules":[{"t":"set","p":"nest_hub","pt":"flow","to":"media_player.nest_kontor","tot":"str"},{"t":"set","p":"nest_hub_friendly_name","pt":"flow","to":"Nest Kontor","tot":"str"},{"t":"set","p":"count_unavailable","pt":"flow","to":"counter.nest_kontor_utilgjengelig","tot":"str"},{"t":"set","p":"boolean_recently_unavailable","pt":"flow","to":"input_boolean.nest_kontor_recently_unavailable","tot":"str"},{"t":"set","p":"count_recasts","pt":"flow","to":"counter.nest_kontor_recasts","tot":"str"},{"t":"set","p":"native_view","pt":"flow","to":"Home: Nest Front","tot":"str"},{"t":"set","p":"native_view_name","pt":"flow","to":"nest-front","tot":"str"},{"t":"set","p":"dashboard_path","pt":"flow","to":"google-nest","tot":"str"},{"t":"set","p":"light_theme","pt":"flow","to":"default","tot":"str"},{"t":"set","p":"dark_theme","pt":"flow","to":"Sunes Dark Theme","tot":"str"},{"t":"set","p":"recast_dash","pt":"flow","to":"recast-dash","tot":"str"},{"t":"set","p":"unavailable_dash","pt":"flow","to":"unavailable-dash","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":100,"wires":[[]]},{"id":"52980886ee36b7bc","type":"inject","z":"2720bad4b7ca5c26","name":"NR Started","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":110,"y":100,"wires":[["8c41d2e404aa2fc8"]]},{"id":"777546733305e5c3","type":"comment","z":"2720bad4b7ca5c26","name":"Recast v11 August 2022","info":"","x":470,"y":20,"wires":[]},{"id":"3fa4749eade9f74d","type":"switch","z":"2720bad4b7ca5c26","name":"Wrong Dashboard","property":"data.event.new_state.attributes.media_title","propertyType":"msg","rules":[{"t":"neq","v":"native_view","vt":"flow"}],"checkall":"true","repair":true,"outputs":1,"x":410,"y":440,"wires":[["d77ce05e3d540931"]]},{"id":"d77ce05e3d540931","type":"switch","z":"2720bad4b7ca5c26","name":"Playing","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"playing","vt":"str"}],"checkall":"false","repair":true,"outputs":1,"x":580,"y":440,"wires":[["13a8a847cbea8a50"]]},{"id":"f8a0beba7b6d1d57","type":"stoptimer-varidelay","z":"2720bad4b7ca5c26","duration":"10","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"x":1180,"y":300,"wires":[["fbbb57ff050f5ed7"],[],[]]},{"id":"169f680dcbfe0637","type":"stoptimer-varidelay","z":"2720bad4b7ca5c26","duration":"30","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":1190,"y":480,"wires":[["8f373a5dba096e86"],[],[]]},{"id":"943cebc7b73030dc","type":"comment","z":"2720bad4b7ca5c26","name":"No View Showing, Mute Audio and start dashboard","info":"","x":1290,"y":440,"wires":[]},{"id":"013f37762e32d91e","type":"comment","z":"2720bad4b7ca5c26","name":"Wrong dash, start dashboard","info":"","x":1220,"y":260,"wires":[]},{"id":"4bcba1ec6a181f84","type":"api-call-service","z":"2720bad4b7ca5c26","name":"Cast Dash Recast","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"cast","service":"show_lovelace_view","areaId":[],"deviceId":[],"entityId":[],"data":"{\"entity_id\":\"{{flow.nest_hub}}\",\"dashboard_path\": \"{{flow.dashboard_path}}\", \"view_path\":\"{{flow.recast_dash}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1770,"y":840,"wires":[["93ef151b83ac1bd9"]]},{"id":"8f373a5dba096e86","type":"api-call-service","z":"2720bad4b7ca5c26","name":"Mute","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"media_player","service":"volume_mute","areaId":[],"deviceId":[],"entityId":["{{flow.nest_hub}}"],"data":"{\"is_volume_muted\":\"true\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1710,"y":760,"wires":[["4bcba1ec6a181f84"]]},{"id":"13a8a847cbea8a50","type":"switch","z":"2720bad4b7ca5c26","name":"Active App Name","property":"data.event.new_state.attributes.app_name","propertyType":"msg","rules":[{"t":"eq","v":"Home Assistant Lovelace","vt":"str"},{"t":"nempty"},{"t":"empty"}],"checkall":"false","repair":true,"outputs":3,"x":750,"y":440,"wires":[["f8a0beba7b6d1d57"],["2cb766cb59ea6fd9"],["169f680dcbfe0637"]]},{"id":"9b3073ab04dc3b72","type":"comment","z":"2720bad4b7ca5c26","name":"Other info displayed. Stop timers.","info":"","x":1270,"y":380,"wires":[]},{"id":"93ef151b83ac1bd9","type":"stoptimer-varidelay","z":"2720bad4b7ca5c26","duration":"20","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":1790,"y":920,"wires":[["0e6c2144ad30fb66"],[],[]]},{"id":"242494869748a091","type":"api-call-service","z":"2720bad4b7ca5c26","name":"Cast View","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"cast","service":"show_lovelace_view","areaId":[],"deviceId":[],"entityId":[],"data":"{\"entity_id\":\"{{flow.nest_hub}}\",\"dashboard_path\": \"{{flow.dashboard_path}}\", \"view_path\":\"{{flow.native_view_name}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1720,"y":300,"wires":[[]]},{"id":"0e6c2144ad30fb66","type":"api-call-service","z":"2720bad4b7ca5c26","name":"Cast View","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"cast","service":"show_lovelace_view","areaId":[],"deviceId":[],"entityId":[],"data":"{\"entity_id\":\"{{flow.nest_hub}}\",\"dashboard_path\": \"{{flow.dashboard_path}}\", \"view_path\":\"{{flow.native_view_name}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1780,"y":1000,"wires":[[]]},{"id":"106ffe704d960a76","type":"api-call-service","z":"2720bad4b7ca5c26","name":"Turn Off Cast","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"media_player","service":"turn_off","areaId":[],"deviceId":[],"entityId":["{{flow.nest_hub}}"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"off","valueType":"str"}],"queue":"none","x":1430,"y":760,"wires":[["8f373a5dba096e86"]]},{"id":"c088781c7ff716bb","type":"stoptimer-varidelay","z":"2720bad4b7ca5c26","duration":"20","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":1190,"y":760,"wires":[["106ffe704d960a76"],[],[]]},{"id":"fbbb57ff050f5ed7","type":"api-call-service","z":"2720bad4b7ca5c26","name":"Mute","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"media_player","service":"volume_mute","areaId":[],"deviceId":[],"entityId":["{{flow.nest_hub}}"],"data":"{\"is_volume_muted\":\"true\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1410,"y":300,"wires":[["242494869748a091"]]},{"id":"7b71f873248cb657","type":"ha-wait-until","z":"2720bad4b7ca5c26","name":"Wait until state is Playing","server":"efa095ae.2fe438","version":1,"outputs":1,"entityId":"{{flow.nest_hub}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"playing","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"data","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":430,"y":720,"wires":[["c088781c7ff716bb"]]},{"id":"b814eb8b0cfa373c","type":"comment","z":"2720bad4b7ca5c26","name":"Wrong Dashboard","info":"","x":410,"y":400,"wires":[]},{"id":"bb34f16ddffee5c7","type":"comment","z":"2720bad4b7ca5c26","name":"Lost Network Connection (UNAVAILABLE)","info":"","x":480,"y":680,"wires":[]},{"id":"a0925d05033eae28","type":"trigger-state","z":"2720bad4b7ca5c26","name":"Unavailable or not?","server":"efa095ae.2fe438","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"media_player.nest_kontor","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is_not","comparatorValueDatatype":"str","comparatorValue":"unavailable"}],"inputs":0,"outputs":2,"customoutputs":[],"outputinitially":true,"state_type":"str","enableInput":false,"x":90,"y":500,"wires":[["5105a5eb43b7ae53","3fa4749eade9f74d","572e20d86f9d8d3d"],["7b71f873248cb657","33989c4005c5b30c"]]},{"id":"5105a5eb43b7ae53","type":"switch","z":"2720bad4b7ca5c26","name":"Correct Dashboard","property":"data.event.new_state.attributes.media_title","propertyType":"msg","rules":[{"t":"eq","v":"native_view","vt":"flow"}],"checkall":"true","repair":true,"outputs":1,"x":410,"y":220,"wires":[["ca6acc1a5f84052d"]]},{"id":"75d53fc724119a94","type":"comment","z":"2720bad4b7ca5c26","name":"Correct Dashboard - Stop Timers","info":"","x":450,"y":180,"wires":[]},{"id":"ca6acc1a5f84052d","type":"link out","z":"2720bad4b7ca5c26","name":"Stop Timer","mode":"link","links":["77effa96268667b0","16900189d0a05d0b","1a982eeb2ba96de0","e5138d081579585e","593c6076a0c9edb7"],"x":675,"y":220,"wires":[]},{"id":"0d79fe948341a94d","type":"comment","z":"2720bad4b7ca5c26","name":"Stop Timer","info":"","x":760,"y":220,"wires":[]},{"id":"16900189d0a05d0b","type":"link in","z":"2720bad4b7ca5c26","name":"Out - Stop Timer","links":["ca6acc1a5f84052d","2cb766cb59ea6fd9","6b616af1b84f31a9","622d26509fee6e48"],"x":845,"y":300,"wires":[["5b7f7543aefbef79"]]},{"id":"5b7f7543aefbef79","type":"function","z":"2720bad4b7ca5c26","name":"Stop timers","func":"msg.payload = \"STOP\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":940,"y":300,"wires":[["f8a0beba7b6d1d57","169f680dcbfe0637","1c14d096ace848f8"]]},{"id":"2cb766cb59ea6fd9","type":"link out","z":"2720bad4b7ca5c26","name":"Stop Timer","mode":"link","links":["77effa96268667b0","16900189d0a05d0b","1a982eeb2ba96de0","e5138d081579585e","593c6076a0c9edb7"],"x":1115,"y":380,"wires":[]},{"id":"572e20d86f9d8d3d","type":"switch","z":"2720bad4b7ca5c26","name":"Wrong Dashboard","property":"data.event.new_state.attributes.media_title","propertyType":"msg","rules":[{"t":"neq","v":"native_view","vt":"flow"}],"checkall":"true","repair":true,"outputs":1,"x":410,"y":600,"wires":[["41824096d3f67c63"]]},{"id":"41824096d3f67c63","type":"switch","z":"2720bad4b7ca5c26","name":"Idle or Off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"idle","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"false","repair":true,"outputs":2,"x":580,"y":600,"wires":[["1c14d096ace848f8"],["1c14d096ace848f8"]]},{"id":"1c14d096ace848f8","type":"stoptimer-varidelay","z":"2720bad4b7ca5c26","duration":"30","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":1190,"y":600,"wires":[["622d26509fee6e48","8f373a5dba096e86"],[],[]]},{"id":"abcd1635218d3bce","type":"comment","z":"2720bad4b7ca5c26","name":"Idle or Off","info":"","x":380,"y":560,"wires":[]},{"id":"622d26509fee6e48","type":"link out","z":"2720bad4b7ca5c26","name":"Stop Timer","mode":"link","links":["77effa96268667b0","16900189d0a05d0b","1a982eeb2ba96de0","e5138d081579585e","593c6076a0c9edb7"],"x":1395,"y":600,"wires":[]},{"id":"aecf83a5b7856975","type":"comment","z":"2720bad4b7ca5c26","name":"Stop Wait if Unavailable","info":"","x":1520,"y":600,"wires":[]},{"id":"2880953aae1fd42f","type":"function","z":"2720bad4b7ca5c26","name":"Stop Wait if OFF for 30 sec","func":"msg.reset = \"now\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":840,"wires":[["7b71f873248cb657","33989c4005c5b30c"]]},{"id":"593c6076a0c9edb7","type":"link in","z":"2720bad4b7ca5c26","name":"Out - Stop Timer","links":["ca6acc1a5f84052d","2cb766cb59ea6fd9","6b616af1b84f31a9","622d26509fee6e48"],"x":295,"y":840,"wires":[["2880953aae1fd42f"]]},{"id":"33989c4005c5b30c","type":"ha-wait-until","z":"2720bad4b7ca5c26","name":"Wait until state is Off","server":"efa095ae.2fe438","version":1,"outputs":1,"entityId":"{{flow.nest_hub}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"data","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":420,"y":780,"wires":[["c088781c7ff716bb"]]},{"id":"f5093cebd2ac5046","type":"comment","z":"2720bad4b7ca5c26","name":"Idle or Off","info":"","x":1160,"y":560,"wires":[]},{"id":"e72f2baf5d581bfa","type":"comment","z":"2720bad4b7ca5c26","name":"Unavailable","info":"","x":1170,"y":720,"wires":[]},{"id":"efa095ae.2fe438","type":"server","name":"Home Assistant - SA","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]
Advertisement
Add Comment
Please, Sign In to add comment