UNPKG

node-red-contrib-home-assistant-websocket

Version:
2 lines (1 loc) 1.29 kB
[{"id":"80c20ba2.f09cd8","type":"ha-get-entities","z":"c89d915bdff0f798","name":"get lights that are on","server":"","version":1,"rules":[{"condition":"state_object","property":"entity_id","logic":"starts_with","value":"light.","valueType":"str"},{"condition":"state_object","property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":false,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":516,"y":1152,"wires":[["cafbf446.080928"]]},{"id":"cafbf446.080928","type":"api-call-service","z":"c89d915bdff0f798","name":"turn them off","server":"","version":6,"debugenabled":false,"action":"light.turn_off","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\"entity_id\": $join(payload.entity_id,\",\")}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","domain":"light","service":"turn_off","output_location":"","output_location_type":"none","x":710,"y":1152,"wires":[[]]},{"id":"39666758.cee048","type":"inject","z":"c89d915bdff0f798","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":332,"y":1152,"wires":[["80c20ba2.f09cd8"]]}]