-
Notifications
You must be signed in to change notification settings - Fork 1
/
google_welcome_home
1 lines (1 loc) · 7.21 KB
/
google_welcome_home
1
[{"id":"b28760da.23065","type":"tab","label":"google say","disabled":false,"info":""},{"id":"62077d9a.93c034","type":"api-call-service","z":"b28760da.23065","name":"Google say welcome ","server":"c70028c6.b5cd08","version":1,"debugenabled":true,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.master_bedroom_speaker","data":"{\"message\":\"hello Master welcom home the living room temperature is {{payload}}\",\"language\":\"en\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":320,"wires":[["9f273066.82c38"]]},{"id":"c5b5df1c.4f73e","type":"inject","z":"b28760da.23065","name":"inject test","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":240,"wires":[["c0c0e6cf.236e58"]]},{"id":"c0c0e6cf.236e58","type":"api-current-state","z":"b28760da.23065","name":"temp","server":"c70028c6.b5cd08","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.temperature_5_living_temp","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":310,"y":317,"wires":[["62077d9a.93c034"]]},{"id":"3e2774a.899208c","type":"server-state-changed","z":"b28760da.23065","name":"someone home","server":"c70028c6.b5cd08","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.rod_home","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":100,"y":100,"wires":[["c217b217.44f3a"],[]]},{"id":"c217b217.44f3a","type":"delay","z":"b28760da.23065","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":280,"y":100,"wires":[["66f6d96b.9caa98"]]},{"id":"66f6d96b.9caa98","type":"ha-wait-until","z":"b28760da.23065","name":"time from car to house door open","server":"c70028c6.b5cd08","outputs":2,"entityId":"binary_sensor.openclose_15_back_door","entityIdFilterType":"exact","property":"state","comparator":"is","value":"on","valueType":"str","timeout":"10","timeoutType":"num","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":false,"blockInputOverrides":true,"x":540,"y":157,"wires":[["99f55bb2.d08dc8"],[]]},{"id":"99f55bb2.d08dc8","type":"delay","z":"b28760da.23065","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":440,"y":237,"wires":[["c0c0e6cf.236e58"]]},{"id":"9f273066.82c38","type":"delay","z":"b28760da.23065","name":"","pauseType":"delay","timeout":"7","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":740,"y":320,"wires":[["8131d448.584228"]]},{"id":"1ff46be4.7cd024","type":"comment","z":"b28760da.23065","name":"wait for life360 to update HA","info":"delay sometimes location is updated slow or picked my up as home if im just driving by driveway and for Life360 location to update HA . \nsometimes it takes a few minutes. ","x":300,"y":60,"wires":[]},{"id":"879a73aa.373af","type":"comment","z":"b28760da.23065","name":"will cancle flow if I never come in house ","info":"","x":550,"y":120,"wires":[]},{"id":"f8c6b265.2a195","type":"comment","z":"b28760da.23065","name":"sensor value to be included in announcement","info":"","x":210,"y":380,"wires":[]},{"id":"4e3d4eb1.7333d","type":"comment","z":"b28760da.23065","name":"google say, can also use Data attributes open comment for example","info":"\"message\": \"hello Master Rod your phone battery is at{{data.attributes.battery}} Percent please charge \",","x":700,"y":380,"wires":[]},{"id":"4b5becc0.954314","type":"api-call-service","z":"b28760da.23065","name":"Google say charge if needed","server":"c70028c6.b5cd08","version":1,"debugenabled":true,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.master_bedroom_speaker","data":"{\"message\":\" Rod your phone battery is at{{data.attributes.battery}} Percent please charge \",\"language\":\"en\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":664,"y":433,"wires":[[]]},{"id":"80bfe6f6.541d08","type":"switch","z":"b28760da.23065","name":"low battery <30%","property":"data.attributes.battery","propertyType":"msg","rules":[{"t":"lt","v":"30","vt":"num"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":430,"y":440,"wires":[["4b5becc0.954314"],[]]},{"id":"8131d448.584228","type":"api-current-state","z":"b28760da.23065","name":"rods Phone","server":"c70028c6.b5cd08","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"device_tracker.life360_rod_poplarchick","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":210,"y":440,"wires":[["80bfe6f6.541d08","6c47b71d.ac49e8"]]},{"id":"6c47b71d.ac49e8","type":"debug","z":"b28760da.23065","name":"extract atrabutes with debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":300,"y":520,"wires":[]},{"id":"bfce5ed7.39798","type":"comment","z":"b28760da.23065","name":"click here to see how to find atrabutes ","info":"to find what you need to put in call of service node google say data message to pull current value of intity attrubute you want in your message. {{data.attributes.battery}}\n\ngo to debug window click on errow next to opject\nthen\nerrow next to data \nrepet the drill down untill you get to attributes.\n\nattributes: object\nsource_type: \"gps\"\nlatitude: \nlongitude: \ngps_accuracy: 15\nbattery: 92\naddress: \"my house Hwy 41, Oakhurst, CA\"\nat_loc_since: \"2020-07-10T01:04:07+00:00\"\nbattery_charging: false\ndriving: false\nlast_seen: \"2020-07-10T17:21:58+00:00\"\nmoving: false\nplace: null\nraw_speed: null\nspeed: \"unknown\"\nwifi_on: true\nscanner: \"NmapDeviceScanner\"\nip: \"192.168.86.$$$$\"\nfriendly_name: \"life360_rod_poplarchick\"\n\nThen mouse over the attribute you want to use and select the first box (copy path)\nthen you can paste that between the\nbrackets {{ }} \nlike this\n{{data.attributes.battery}}\nin the data of the call of service node\n\n\n{\n \"message\": \" Rod your phone battery is at{{data.attributes.battery}} Percent please charge \",\n \"language\": \"en\"\n}","x":350,"y":560,"wires":[]},{"id":"66d633c2.edb27c","type":"comment","z":"b28760da.23065","name":"inject for testing and geting debug info","info":"","x":150,"y":200,"wires":[]},{"id":"c70028c6.b5cd08","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]