Suneman

Recast 12

Jan 20th, 2023
592
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.46 KB | None | 0 0
  1. [{"id":"d43363caef07eeec","type":"comment","z":"fe673b7d4e903eae","name":"-------- Google Nest Hovedsoverom -------- ","info":"","x":180,"y":20,"wires":[]},{"id":"95eb88ce341fafac","type":"comment","z":"fe673b7d4e903eae","name":"---------- Settings ----------","info":"","x":130,"y":60,"wires":[]},{"id":"bf04be1238dc88cd","type":"change","z":"fe673b7d4e903eae","name":"Flow settings","rules":[{"t":"set","p":"nest_hub","pt":"flow","to":"media_player.nest_hovedsoverom","tot":"str"},{"t":"set","p":"nest_hub_friendly_name","pt":"flow","to":"Nest Hovedsoverom","tot":"str"},{"t":"set","p":"count_unavailable","pt":"flow","to":"counter.nest_hovedsoverom_utilgjengelig","tot":"str"},{"t":"set","p":"boolean_recently_unavailable","pt":"flow","to":"input_boolean.nest_hovedsoverom_recently_unavailable","tot":"str"},{"t":"set","p":"count_recasts","pt":"flow","to":"counter.nest_hovedsoverom","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":"576d8f987b5fc8e8","type":"inject","z":"fe673b7d4e903eae","name":"NR Started","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":110,"y":100,"wires":[["bf04be1238dc88cd"]]},{"id":"ba98627e240a6dad","type":"comment","z":"fe673b7d4e903eae","name":"Recast v12 Desember 2022","info":"","x":460,"y":20,"wires":[]},{"id":"5e93fd657b6611d5","type":"group","z":"fe673b7d4e903eae","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["ad0b8fc6994a750b","c191ec101b7a62ef","bf4247ef1c48ecb3","3d513115b15a5ae4","4e6fdc2a70301778","b6fa5712d8b25512","7307ed3dd7f74257","7b0e7783a3431f0c","a5c0b1112a954ced","da6aaaf7e315669c","ebada0c03a2a96ea","0ff4b713abfcf8ad","72c8768d78b2d42a","517f953fdbbfd685","ba613ad8d17a7231","31e59e85de9389f2","25cf9ca22e193670","994789a1a4cef2f8","d37ae525d9086a85","86171ffa464ba05b","0bfda64b0c98e968","b201904d166423c1","ea5347945b5e02e5","17fcf6dd0483908c","78d1073ceaa9b696","df327c7a4a38a14e","9c872bd3f4ceddf6","65287082471d0286","e6e3a7db1b34532e","e5ad7eb0b60c2551","b9d559690f387814","5ff956189ef6dcf0","027bd4bb18e07b42","d4f3fb1703de7e64","06c40ca0101a2be0","7514d3ac4a3bd189","4ff79dd278985859","e999bbd3e77c9ca3","c56ccb4d90b6a909","595321e263276ae3","d9a8c58e72aa9db6","7fc3a5e485d4dab3","be307889da68268c"],"x":34,"y":159,"w":2952,"h":742},{"id":"ad0b8fc6994a750b","type":"switch","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":450,"y":460,"wires":[["c191ec101b7a62ef"]]},{"id":"c191ec101b7a62ef","type":"switch","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Playing","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"playing","vt":"str"}],"checkall":"false","repair":true,"outputs":1,"x":620,"y":460,"wires":[["a5c0b1112a954ced"]]},{"id":"bf4247ef1c48ecb3","type":"stoptimer-varidelay","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","duration":"10","durationType":"num","units":"Minute","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"x":1220,"y":320,"wires":[["31e59e85de9389f2"],[],[]]},{"id":"3d513115b15a5ae4","type":"stoptimer-varidelay","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","duration":"30","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":1230,"y":500,"wires":[["7fc3a5e485d4dab3"],[],[]]},{"id":"4e6fdc2a70301778","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"No View Showing, Mute Audio and start dashboard","info":"","x":1330,"y":460,"wires":[]},{"id":"b6fa5712d8b25512","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Wrong dash, start dashboard","info":"","x":1260,"y":280,"wires":[]},{"id":"7307ed3dd7f74257","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":2010,"y":780,"wires":[["ebada0c03a2a96ea"]]},{"id":"7b0e7783a3431f0c","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":1670,"y":780,"wires":[["7307ed3dd7f74257"]]},{"id":"a5c0b1112a954ced","type":"switch","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":790,"y":460,"wires":[["bf4247ef1c48ecb3"],["9c872bd3f4ceddf6"],["3d513115b15a5ae4"]]},{"id":"da6aaaf7e315669c","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Other info displayed. Stop timers.","info":"","x":1310,"y":400,"wires":[]},{"id":"ebada0c03a2a96ea","type":"stoptimer-varidelay","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","duration":"20","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":2310,"y":780,"wires":[["72c8768d78b2d42a"],[],[]]},{"id":"0ff4b713abfcf8ad","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":2520,"y":440,"wires":[["c56ccb4d90b6a909"]]},{"id":"72c8768d78b2d42a","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":2520,"y":780,"wires":[["595321e263276ae3"]]},{"id":"517f953fdbbfd685","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":780,"wires":[["7b0e7783a3431f0c"]]},{"id":"ba613ad8d17a7231","type":"stoptimer-varidelay","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","duration":"20","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":1230,"y":780,"wires":[["517f953fdbbfd685"],[],[]]},{"id":"31e59e85de9389f2","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":2290,"y":320,"wires":[["0ff4b713abfcf8ad"]]},{"id":"25cf9ca22e193670","type":"ha-wait-until","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Wait until state is Playing","server":"efa095ae.2fe438","version":2,"outputs":1,"entityId":"{{flow.nest_hub}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"playing","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","checkCurrentState":true,"blockInputOverrides":true,"outputProperties":[],"x":470,"y":740,"wires":[["ba613ad8d17a7231"]]},{"id":"994789a1a4cef2f8","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Wrong Dashboard","info":"","x":450,"y":420,"wires":[]},{"id":"d37ae525d9086a85","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Lost Network Connection (UNAVAILABLE)","info":"","x":520,"y":700,"wires":[]},{"id":"86171ffa464ba05b","type":"trigger-state","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Unavailable or not?","server":"efa095ae.2fe438","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"media_player.nest_hovedsoverom","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":150,"y":520,"wires":[["0bfda64b0c98e968","ad0b8fc6994a750b","65287082471d0286"],["25cf9ca22e193670","7514d3ac4a3bd189"]]},{"id":"0bfda64b0c98e968","type":"switch","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":450,"y":240,"wires":[["ea5347945b5e02e5"]]},{"id":"b201904d166423c1","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Correct Dashboard - Stop Timers","info":"","x":490,"y":200,"wires":[]},{"id":"ea5347945b5e02e5","type":"link out","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Stop Timer","mode":"link","links":["77effa96268667b0","78d1073ceaa9b696","1a982eeb2ba96de0","e5138d081579585e","06c40ca0101a2be0"],"x":715,"y":240,"wires":[]},{"id":"17fcf6dd0483908c","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Stop Timer","info":"","x":800,"y":240,"wires":[]},{"id":"78d1073ceaa9b696","type":"link in","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Out - Stop Timer","links":["ea5347945b5e02e5","9c872bd3f4ceddf6","6b616af1b84f31a9","5ff956189ef6dcf0","f96cc4e2ddb84e4a"],"x":885,"y":320,"wires":[["df327c7a4a38a14e"]]},{"id":"df327c7a4a38a14e","type":"function","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Stop timers","func":"msg.payload = \"STOP\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":980,"y":320,"wires":[["bf4247ef1c48ecb3","3d513115b15a5ae4","e5ad7eb0b60c2551"]]},{"id":"9c872bd3f4ceddf6","type":"link out","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Stop Timer","mode":"link","links":["77effa96268667b0","78d1073ceaa9b696","1a982eeb2ba96de0","e5138d081579585e","06c40ca0101a2be0"],"x":1155,"y":400,"wires":[]},{"id":"65287082471d0286","type":"switch","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":450,"y":620,"wires":[["e6e3a7db1b34532e"]]},{"id":"e6e3a7db1b34532e","type":"switch","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":620,"y":620,"wires":[["e5ad7eb0b60c2551"],["e5ad7eb0b60c2551"]]},{"id":"e5ad7eb0b60c2551","type":"stoptimer-varidelay","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","duration":"30","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":1230,"y":620,"wires":[["5ff956189ef6dcf0","7fc3a5e485d4dab3"],[],[]]},{"id":"b9d559690f387814","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Idle or Off","info":"","x":420,"y":580,"wires":[]},{"id":"5ff956189ef6dcf0","type":"link out","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Stop Timer","mode":"link","links":["77effa96268667b0","78d1073ceaa9b696","1a982eeb2ba96de0","e5138d081579585e","06c40ca0101a2be0"],"x":1435,"y":620,"wires":[]},{"id":"027bd4bb18e07b42","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Stop Wait if Unavailable","info":"","x":1560,"y":620,"wires":[]},{"id":"d4f3fb1703de7e64","type":"function","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Stop Wait if OFF for 30 sec","func":"msg.reset = \"now\";\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":860,"wires":[["25cf9ca22e193670","7514d3ac4a3bd189"]]},{"id":"06c40ca0101a2be0","type":"link in","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Out - Stop Timer","links":["ea5347945b5e02e5","9c872bd3f4ceddf6","6b616af1b84f31a9","5ff956189ef6dcf0","f96cc4e2ddb84e4a"],"x":325,"y":860,"wires":[["d4f3fb1703de7e64"]]},{"id":"7514d3ac4a3bd189","type":"ha-wait-until","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Wait until state is Off","server":"efa095ae.2fe438","version":2,"outputs":1,"entityId":"{{flow.nest_hub}}","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"seconds","checkCurrentState":true,"blockInputOverrides":true,"outputProperties":[],"x":460,"y":800,"wires":[["ba613ad8d17a7231"]]},{"id":"4ff79dd278985859","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Idle or Off","info":"","x":1200,"y":580,"wires":[]},{"id":"e999bbd3e77c9ca3","type":"comment","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Unavailable","info":"","x":1210,"y":740,"wires":[]},{"id":"c56ccb4d90b6a909","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Count RECASTS","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"counter","service":"increment","areaId":[],"deviceId":[],"entityId":["{{flow.count_recasts}}"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2850,"y":440,"wires":[[]]},{"id":"595321e263276ae3","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","name":"Count UNAVAILABLE","server":"efa095ae.2fe438","version":5,"debugenabled":false,"domain":"counter","service":"increment","areaId":[],"deviceId":[],"entityId":["{{flow.count_unavailable}}"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2860,"y":780,"wires":[[]]},{"id":"d9a8c58e72aa9db6","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":2010,"y":540,"wires":[["be307889da68268c"]]},{"id":"7fc3a5e485d4dab3","type":"api-call-service","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","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":1670,"y":540,"wires":[["d9a8c58e72aa9db6"]]},{"id":"be307889da68268c","type":"stoptimer-varidelay","z":"fe673b7d4e903eae","g":"5e93fd657b6611d5","duration":"20","durationType":"num","units":"Second","payloadtype":"num","payloadval":"0","name":"","reporting":"every_second","persist":true,"ignoretimerpass":false,"x":2310,"y":540,"wires":[["0ff4b713abfcf8ad"],[],[]]},{"id":"efa095ae.2fe438","type":"server","name":"HomeAssistant","version":5,"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","enableGlobalContextStore":true}]
Advertisement
Add Comment
Please, Sign In to add comment