Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [{"id":"cdc737fdecf2d6c2","type":"comment","z":"16b3e27d7251cf45","name":"----------- Google Nest Hub KONTOR ----------- ","info":"","x":190,"y":40,"wires":[]},{"id":"59fca9811da0c76d","type":"change","z":"16b3e27d7251cf45","name":"Flow settings","rules":[{"t":"set","p":"nest_hub","pt":"flow","to":"media_player.nest_kontor","tot":"str","dc":true},{"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":"stay","pt":"flow","to":"input_boolean.stay_playlist","tot":"str"},{"t":"set","p":"light_theme","pt":"flow","to":"Github Dark Theme","tot":"str"},{"t":"set","p":"dark_theme","pt":"flow","to":"Sunes Dark Theme","tot":"str"},{"t":"set","p":"temporary_dash","pt":"flow","to":"temporary-dash","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":120,"wires":[[]]},{"id":"00d2efe8e7e7a580","type":"inject","z":"16b3e27d7251cf45","name":"NR Started","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":110,"y":120,"wires":[["59fca9811da0c76d"]]},{"id":"cea17a5b641df6e7","type":"comment","z":"16b3e27d7251cf45","name":"---------- Settings ----------","info":"","x":130,"y":80,"wires":[]},{"id":"39fddf3b02e5412e","type":"trigger-state","z":"16b3e27d7251cf45","name":"Nest - State","server":"efa095ae.2fe438","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"media_player.nest_kontor","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"inputs":0,"outputs":2,"customoutputs":[],"outputinitially":true,"state_type":"str","enableInput":false,"x":90,"y":180,"wires":[["5202acbf063ce90f","1ff5bfa4764e0df5"],[]]},{"id":"5202acbf063ce90f","type":"switch","z":"16b3e27d7251cf45","name":"Correct View?","property":"data.event.new_state.attributes.media_title","propertyType":"msg","rules":[{"t":"neq","v":"native_view","vt":"flow"},{"t":"eq","v":"native_view","vt":"flow"}],"checkall":"true","repair":true,"outputs":2,"x":300,"y":260,"wires":[["a9a91cdde5181ed2"],["578e5ed25ecf969e"]]},{"id":"a9a91cdde5181ed2","type":"switch","z":"16b3e27d7251cf45","name":"Payload (state)","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"playing","vt":"str"},{"t":"eq","v":"idle","vt":"str"},{"t":"eq","v":"off","vt":"str"},{"t":"neq","v":"off","vt":"str"}],"checkall":"false","repair":true,"outputs":4,"x":500,"y":520,"wires":[["52ba1c4f656d08ad"],["e3d94c2b18273e85"],["e3d94c2b18273e85"],["8352c5b1a0710c09"]]},{"id":"578e5ed25ecf969e","type":"function","z":"16b3e27d7251cf45","name":"Correct dash, Stop timer","func":"msg.payload = \"STOP\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":700,"wires":[["7b02f72a450ece7c","e3d94c2b18273e85","c14c4c254afcb14c"]]},{"id":"187a5d01d9e1fdfd","type":"comment","z":"16b3e27d7251cf45","name":"Wrong View","info":"","x":490,"y":480,"wires":[]},{"id":"ccf59c7cc5ba81d9","type":"comment","z":"16b3e27d7251cf45","name":"Correct View","info":"","x":490,"y":660,"wires":[]},{"id":"7b02f72a450ece7c","type":"stoptimer-varidelay","z":"16b3e27d7251cf45","duration":"10","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"x":1020,"y":700,"wires":[["ac45457ed261ede4"],[],[]]},{"id":"e3d94c2b18273e85","type":"stoptimer-varidelay","z":"16b3e27d7251cf45","duration":"30","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"last_minute_seconds","persist":true,"x":1030,"y":540,"wires":[["b0d9418e31ad633f"],[],[]]},{"id":"c14c4c254afcb14c","type":"debug","z":"16b3e27d7251cf45","name":"Correct dash. Stop timers.","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":740,"wires":[]},{"id":"dd88c450902243ae","type":"comment","z":"16b3e27d7251cf45","name":"No View Showing, Mute Audio and start dashboard","info":"","x":1370,"y":260,"wires":[]},{"id":"6bcce9844b46cbc5","type":"comment","z":"16b3e27d7251cf45","name":"Wrong dash, start dashboard","info":"","x":1020,"y":660,"wires":[]},{"id":"2cd9c2764bd2fbe7","type":"api-call-service","z":"16b3e27d7251cf45","name":"Cast Temporary 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.temporary_dash}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1280,"y":360,"wires":[["0756333a7296e070"]]},{"id":"b0d9418e31ad633f","type":"api-call-service","z":"16b3e27d7251cf45","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":1230,"y":300,"wires":[["2cd9c2764bd2fbe7"]]},{"id":"a00f92c1cac7907b","type":"debug","z":"16b3e27d7251cf45","name":"No dashboard. Muted and recasted.","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1620,"y":540,"wires":[]},{"id":"37e0bb0c935d911d","type":"debug","z":"16b3e27d7251cf45","name":"Wrong Dashboard. Muted and casted correct dashboard.","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1690,"y":700,"wires":[]},{"id":"439e51538e67243e","type":"api-call-service","z":"16b3e27d7251cf45","name":"Reload Themes Dark","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"frontend","service":"set_theme","areaId":[],"deviceId":[],"entityId":[],"data":"{\"name\":\"{{flow.dark_theme}}\",\"mode\":\"dark\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1520,"y":420,"wires":[[]]},{"id":"52ba1c4f656d08ad","type":"switch","z":"16b3e27d7251cf45","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":710,"y":480,"wires":[["7b02f72a450ece7c"],["d56417b9c1acb287"],["e3d94c2b18273e85"]]},{"id":"d56417b9c1acb287","type":"function","z":"16b3e27d7251cf45","name":"Unit Busy - Stop timer","func":"msg.payload = \"STOP\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":860,"y":400,"wires":[["e3d94c2b18273e85","7b02f72a450ece7c"]]},{"id":"17437a3a8079007d","type":"comment","z":"16b3e27d7251cf45","name":"No dash, start dashboard","info":"","x":1030,"y":500,"wires":[]},{"id":"8a60136684bb7426","type":"comment","z":"16b3e27d7251cf45","name":"Unit is displaying other info. Stop timers.","info":"","x":870,"y":360,"wires":[]},{"id":"0756333a7296e070","type":"stoptimer-varidelay","z":"16b3e27d7251cf45","duration":"30","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"last_minute_seconds","persist":true,"ignoretimerpass":false,"x":1270,"y":480,"wires":[["764bed52aa163a4c"],[],[]]},{"id":"6be7033bb318a950","type":"inject","z":"16b3e27d7251cf45","name":"Start Dashboard","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1020,"y":240,"wires":[["b0d9418e31ad633f"]]},{"id":"cfaee8bc410b7be3","type":"inject","z":"16b3e27d7251cf45","name":"Trigger","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1030,"y":620,"wires":[["ac45457ed261ede4"]]},{"id":"ac45457ed261ede4","type":"api-call-service","z":"16b3e27d7251cf45","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":1240,"y":700,"wires":[["37e0bb0c935d911d"]]},{"id":"8352c5b1a0710c09","type":"switch","z":"16b3e27d7251cf45","name":"Just booted?","property":"data.event.old_state.state","propertyType":"msg","rules":[{"t":"neq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":580,"wires":[["7b02f72a450ece7c"]]},{"id":"764bed52aa163a4c","type":"api-call-service","z":"16b3e27d7251cf45","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":1240,"y":540,"wires":[["a00f92c1cac7907b"]]},{"id":"1a9512eed0b99fb6","type":"inject","z":"16b3e27d7251cf45","name":"Stop Timers","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":850,"y":320,"wires":[["e3d94c2b18273e85","7b02f72a450ece7c"]]},{"id":"ecd2a0d33dc2dfed","type":"inject","z":"16b3e27d7251cf45","name":"Go to front dash","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1020,"y":280,"wires":[["ac45457ed261ede4"]]},{"id":"ba3c4dc7c4722a61","type":"comment","z":"16b3e27d7251cf45","name":"June 2022","info":"","x":420,"y":40,"wires":[]},{"id":"4b874e8b63a1bc33","type":"api-call-service","z":"16b3e27d7251cf45","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":870,"y":180,"wires":[["231c8bc072e70616"]]},{"id":"1ffd479b68d5bd5d","type":"ha-wait-until","z":"16b3e27d7251cf45","name":"","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":460,"y":180,"wires":[["780b74510c7db6b8"]]},{"id":"780b74510c7db6b8","type":"stoptimer-varidelay","z":"16b3e27d7251cf45","duration":"10","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"last_minute_seconds","persist":true,"ignoretimerpass":false,"x":650,"y":180,"wires":[["4b874e8b63a1bc33"],[],[]]},{"id":"1ff5bfa4764e0df5","type":"switch","z":"16b3e27d7251cf45","name":"Unavailable?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"unavailable","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":290,"y":180,"wires":[["1ffd479b68d5bd5d"]]},{"id":"231c8bc072e70616","type":"api-call-service","z":"16b3e27d7251cf45","name":"Counter","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"counter","service":"increment","areaId":[],"deviceId":[],"entityId":["counter.nest_kontor_restarts"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1140,"y":180,"wires":[[]]},{"id":"efa095ae.2fe438","type":"server","name":"Home Assistant - SA","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]
Advertisement
Add Comment
Please, Sign In to add comment