Hi all,
I am pretty new to nodered or programming in general and need your help for a flow.
I have an outside gate and a garage door which I have wired to shellies as such I can open or close them from home assistant.
I am now trying to setup a NFCtag and want to open the gates when the tag is scanned however when my wife is home its normal that the garage door is open and only the outside gate is closed so I need to open only the gate.
This is where I'm stuck, I can get the entity Ids of the ones which are open but now don't know how to progress this. Can I have any pointers pls? This is what I have so far:
[{"id":"b79ee612.ad5248","type":"server-events","z":"662dfd9f43833c42","name":"","server":"80e82e1cf59bf581","version":1,"event_type":"","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":240,"y":280,"wires":[["2505b4d0.1d2edc"]]},{"id":"2505b4d0.1d2edc","type":"switch","z":"662dfd9f43833c42","name":"","property":"payload.event.tag_id","propertyType":"msg","rules":[{"t":"cont","v":"823459da-b2c9-44ba-9e1f-d3eadba18eed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":280,"wires":[["f8e3a0766b2c9090"]]},{"id":"f757662a2e919eac","type":"inject","z":"662dfd9f43833c42","name":"","props":[{"p":"payload.event.tag_id","v":"823459da-b2c9-44ba-9e1f-d3eadba18eed","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":200,"wires":[["2505b4d0.1d2edc"]]},{"id":"521a6a7904e41427","type":"function","z":"662dfd9f43833c42","name":"function 1","func":"","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":280,"wires":[[]]},{"id":"f8e3a0766b2c9090","type":"ha-get-entities","z":"662dfd9f43833c42","name":"","server":"80e82e1cf59bf581","version":0,"rules":[{"property":"entity_id","logic":"includes","value":"binary_sensor.portao_garagem_input, binary_sensor.portao_rua_input","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":550,"y":280,"wires":[["521a6a7904e41427"]]},{"id":"80e82e1cf59bf581","type":"server","name":"Home Assistant","version":2,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]