New to node-red, trouble with an "AND" statement

yes it would, the ac needs to be in the right mode of course.

I dont know how that ac node behaves, if it actually ouputs when deployed.

Let me add a little nodered basics. When deploying a flow you should be using the modified nodes only option.

image

Output on connect would only work if
a) the node was new
b) something inside the node was changed

otherwise it will not output every time you deploy.

Thank you for your time so far. I will try and understand why the state change does not work as expected.

Some news. It actually worked with the state node, it just takes 1-2 minutes to update and take action. I don’t quite know why it’s so slow.

I would like you to try the following. Make a new toggle helper in ha. Set that entity to both the current state and call service node.

[{"id":"1342abc4d283115d","type":"inject","z":"60f2d2277843c698","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":680,"y":1440,"wires":[["1222875b7177b899"]]},{"id":"1222875b7177b899","type":"api-current-state","z":"60f2d2277843c698","name":"","server":"6b1110b5.183a4","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.my_test_toggle","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":970,"y":1440,"wires":[["2ea57e14ef3a1a48"],["2ea57e14ef3a1a48"]]},{"id":"2ea57e14ef3a1a48","type":"api-call-service","z":"60f2d2277843c698","name":"","server":"6b1110b5.183a4","version":5,"debugenabled":false,"domain":"input_boolean","service":"toggle","areaId":[],"deviceId":[],"entityId":["input_boolean.my_test_toggle"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1340,"y":1440,"wires":[[]]},{"id":"6b1110b5.183a4","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

Click the inject over and over. You should see the same behavior as the gif below. The center node every time I click, it toggles, on and off changes instantly.

2024-02-1414-54-05-ezgif.com-video-to-gif-converter

I’ve not tried it yet because when I would do this, the whole message would change and make the automation no longer work.

My current state node has stopped updating entirely again.