node-red-contrib-home-assistant-websocket
Version:
Node-RED integration with Home Assistant through websocket and REST API
2 lines (1 loc) • 2.65 kB
JSON
[{"id":"4ad3d88d8a2357d5","type":"trigger-state","z":"b9bff4863336dc6b","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":284,"y":1248,"wires":[["d115adfcfa168310"],[]]},{"id":"d115adfcfa168310","type":"ha-get-entities","z":"b9bff4863336dc6b","name":"","server":"","version":1,"rules":[{"condition":"stateObject","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":"stateObject","property":"state","logic":"is","value":"open","valueType":"str"}],"outputType":"split","outputEmptyResults":false,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":450,"y":1248,"wires":[["f7e4e11c30fe53bd"]]},{"id":"f7e4e11c30fe53bd","type":"template","z":"b9bff4863336dc6b","name":"Format Friendly Name","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.attributes.friendly_name}}","output":"str","x":654,"y":1248,"wires":[["6932846cb5c86e6f"]]},{"id":"6932846cb5c86e6f","type":"join","z":"b9bff4863336dc6b","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":824,"y":1248,"wires":[["601e97da25388235"]]},{"id":"601e97da25388235","type":"api-call-service","z":"b9bff4863336dc6b","name":"Notify","server":"","version":6,"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","domain":"notify","service":"push_jason","output_location":"payload","output_location_type":"msg","x":952,"y":1248,"wires":[[]]}]