How to create a virtual switch based on 3 other switches and 2 sensors

HA noob here so bear with me please…

I have 3 switches for turning on/off the floor heating in 3 of ground floor rooms.
I also have smart 2 TRVs (thermostatic radiator valves) on the second floor which unfortunately don’t have switches but expose sensors for Valve state on/off.

I wish to create an automation in HA that basically controls the water heater temperature in the following way:

  • “If at least one of the two TRV sensor is ON or at least one of the ground floor switches is ON - configure heater temperature to 45C”
  • “If all TRV valve sensors are OFF and all ground floor switches are OFF - configure heater temperature to 20C”

How do I create the condition? I don’t see a UI helper for a virtual switch, also the combination of sensors and switches is confusing to me.

If I understand correctly, I’m supposed to create a HA switch “Heating On/Off” that changes its value based on the other 3 switches and sensors; and then create an Automation with trigger the state change of the “Heating On/Off” switch to control the water heater’s temperature. How do I do that?

1 Like