Need a little help with this automation

[{"id":"8baacab4.686798","type":"api-call-service","z":"88ff0714.c96c08","name":"Off if 26 or higher","server":"2319e56d.dfc0ea","version":1,"debugenabled":false,"service_domain":"climate","service":"turn_off","entityId":"climate.varmepumpe","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":750,"y":160,"wires":[[]]},{"id":"9b059894.6628b8","type":"switch","z":"88ff0714.c96c08","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"26","vt":"str"},{"t":"gte","v":"27.5","vt":"str"},{"t":"lte","v":"20","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":530,"y":180,"wires":[["8baacab4.686798"],["ca9a4878.f91b28"],["a738cfd6.5e43c"]]},{"id":"6ef7e2fd.42796c","type":"poll-state","z":"88ff0714.c96c08","name":"Temp. sensor","server":"2319e56d.dfc0ea","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"sensor.aeon_labs_zw100_multisensor_6_temperature","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":150,"y":180,"wires":[["9b059894.6628b8"]]},{"id":"a738cfd6.5e43c","type":"api-call-service","z":"88ff0714.c96c08","name":"On if 20 or lower","server":"2319e56d.dfc0ea","version":1,"debugenabled":false,"service_domain":"climate","service":"set_temperature","entityId":"climate.varmepumpe","data":"{\"temperature\":\"23\", \"hvac_mode\":\"heat\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":740,"y":280,"wires":[[]]},{"id":"ca9a4878.f91b28","type":"api-call-service","z":"88ff0714.c96c08","name":"Cool if 27.5 or higher","server":"2319e56d.dfc0ea","version":1,"debugenabled":false,"service_domain":"climate","service":"set_temperature","entityId":"climate.varmepumpe","data":"{\"temperature\":\"20\",\"hvac_mode\":\"cool\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":760,"y":220,"wires":[[]]},{"id":"2319e56d.dfc0ea","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":false}]

Need some help with a few things here.

  1. In the call servive node “Cool if 27.5 or higher” and “On if 20 or lower” I want a delay of one second before sending the next command. Hassio gets both commands sent and updates the status, but it seems that broadlink only perceives the first command it receives.
{
    "temperature": "20",
    some kind of delay here?
    "hvac_mode": "cool"
}
  1. Is it possible to make a switch for Hassio between “Temp.sensor” and “Switch” so that this automation can be switched off?
    If smoke detectors detect smoke / heat then I want to turn off this automation (climate), unlock doors and so on …
  1. If you can separate the call-service into two call-service you can just add a delay button between them in node-red. You can also create a script on HA with the delay included in the script and let your node-red flow as is.

  2. Im using input_booleans to enable and disable the automation from HA frontend but there’s a new way to do that.
    Custom Component for node-red-contrib-home-assistant-websocket

1 Like
  1. Im quite new to node red so I did not think about adding a relay that way :slight_smile:

  2. I have already added the two new nodes, but I dont understand how to make a switch using webhook :flushed:

So your climate is control via your broadlink ir Yes ?
I found using the broadlink in HA unreliable
I send all my ir commands via node red broadlink node
It much better.
Then you have control of what to send and when to send it in node red

Yes, Im using the Smartir component in HA, and it has been working verry good all the time.
I have just started learning Node Red, and I try to move most automations over to NR.

Ok
I Have two bedroom ceiling fans via ir
My first setup of them was using through HA And the inbuilt broadlink integration.
And it work and then didn’t work and then worked and then stopped working. I found it unreliable
Since using the node red broadlink node they work brilliantly.
I can’t comment or make a comparison on the smartir as i havent used that custom component.
The thing with node red is that it only does what you tell it to do and nothing else. homeassistant will do the same but it is also doing a million other things in the background. Which is probably why my welcome home announcement on Alexa automation didn’t trigger last night when we came home. I need to move that to node red.

1 Like