How do you do a multi-level selection?

Hello,

I need some ideas as I’m just a layman and help with programming.

I want to operate my sauna with a three-stage heater; each Heistab 2400W is controlled via a corresponding relay.

My goal would be to use a helper in Homeassistat to define how many heating circuits should be used.
The default value is transmitted to ESPHome (Mode 1 - Relay 1, Mode 2 - Relay1 & Relay2, Mode 3 - Relay 1 & 2 & 3).

I can already read the value with the following code:


   - platform: homeassistant
     name: "Sauna Performance From Home Assistant"
     entity_id: input_number.Sauna power
     id: sauna_performance

However, I don’t know how I can process this value further.

Thanks for sensible solution ideas.

Gerald

Process it how? Have you defined the relays on the ESPHome device? Then you simply use an on_value: automation attached to your homeassistant: sensor to turn your relays on and off as required.

Similar requirement example

Your question is confusing. Are you just trying to make an input select where you have 3 modes and each mode turns on/off a combination of relays?

No - combination.

  1. Mode → Heating element A
  2. Mode → Heating element A and B
  3. Mode → Heating element A + B + C

Then that would be a Yes. That is exactly what I described and asked if that’s what you were asking. A and B or A + B + C that’s what you call a combination. So you make an Input Select and you’re going to need a bunch of if-then statements that cover each possible choice. If - mode1 then - turn_on Heat A
This is all covered and has examples in the Docs under Automations