Trying to read a sensor entity into a switch node

I’m trying to change the behavior of my A/C because the ‘auto’ function doesn’t do what I want.
Screenshot as info :


Inside the ‘heat/cool’ switch node, I want to compare the incoming message with a sensor value from HA called ‘sensor.ac_woonkamer_set_temperature’
Now the value ‘23’ is hardcoded :
image
I tried to add

$number($entities("sensor.ac_woonkamer_set_temperature").state)

As JSON in the first box '>=" , but that didn’t work
As a result I want a 3 way switch node

  • “sensor.ac_woonkamer_set_temperature”
  • “sensor.ac_woonkamer_set_temperature” - 1
  • “sensor.ac_woonkamer_set_temperature” - 3

So I can set the A/C unit on COOL or HEAT depending on that switch node, and not on AUTO, because that doesn’t work/

HA JSONata functions can’t be used outside of the HA nodes. Use the current state node before the switch to set another msg property to the value of sensor.ac_woonkamer_set_temperature.

Then in the switch node use JSONata for each condition.

woonkamer - 1

image

Great ! Will test it later today

Maybe another question in between, I want to set the HAV mode to "cool’ & temperature to ‘23’ in 1 command, is that possible ?
Now I send 2 separate commands, and the airco sounds a ‘ping’ on every command, so that’s annoying :slight_smile:
image
image
image