node-red-contrib-home-assistant-websocket
Version:
Node-RED integration with Home Assistant through websocket and REST API
2 lines (1 loc) • 2.79 kB
JSON
[{"id":"4ad3d88d8a2357d5","type":"trigger-state","z":"c285d687b9cdd0c8","name":"Left Home","server":"","version":5,"inputs":1,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["device_tracker.jason"],"substring":[],"regex":[]},"debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"previous_state","propertyValue":"old_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"home"},{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"not_home"}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":true,"x":316,"y":704,"wires":[["d115adfcfa168310"],[]]},{"id":"d115adfcfa168310","type":"ha-get-entities","z":"c285d687b9cdd0c8","name":"","server":"","version":1,"rules":[{"condition":"state_object","property":"entity_id","logic":"includes","value":"binary_sensor.front_door,binary_sensor.back_door,binary_sensor.front_window,binary_sensor.back_window","valueType":"str"},{"condition":"state_object","property":"state","logic":"is","value":"open","valueType":"str"}],"outputType":"split","outputEmptyResults":false,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":482,"y":704,"wires":[["f7e4e11c30fe53bd"]]},{"id":"f7e4e11c30fe53bd","type":"template","z":"c285d687b9cdd0c8","name":"Format Friendly Name","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.attributes.friendly_name}}","output":"str","x":686,"y":704,"wires":[["6932846cb5c86e6f"]]},{"id":"6932846cb5c86e6f","type":"join","z":"c285d687b9cdd0c8","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":",","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":856,"y":704,"wires":[["601e97da25388235"]]},{"id":"601e97da25388235","type":"api-call-service","z":"c285d687b9cdd0c8","name":"Notify","server":"","version":7,"debugenabled":false,"action":"notify.push_jason","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\"message\": \"The {{payload}} are open.\",\"title\": \"Left Open\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","blockInputOverrides":false,"domain":"notify","service":"push_jason","output_location":"payload","output_location_type":"msg","x":984,"y":704,"wires":[[]]},{"id":"0a8d88377395ab75","type":"global-config","env":[],"modules":{"node-red-contrib-home-assistant-websocket":"0.78.0"}}]