Switch with 4 steps

Hello,

I have a fan, that is controlled with two inputs 1 and 2 which can be “0” and “1” - with this the fan can be controlled in 4 different steps (off and 3 different speeds).

At the moment I control this with two single switches:

image

But what I would like to have is one switch with the steps 0 - 1 - 2 - 3

How can this be done?

I did not find a solution up to now.

Thank you in advanvce.

Greets Karl

A fan template should work perfect for you:

Thank you for your reply.

I now did the following:

I created an Input select for my fan with the 4 values (off, step1, step2, step3) and then I created an automation that is triggered when I change the value of the input select.

Is this the right way (so I need 4 automations for one drop down field) ?

Is it also possible to have a something like a sliding controller instead of the drop-down ?

It’s the right way but it can be done with a single automation. Post the automation(s) you created and I’ll show you how to do it.

Perhaps you are thinking of an Input Number?

Be advised that it’s displayed in the UI as a fairly short horizontal slider.

I have this automations (one for each step) - here the examples for “step 0” and “step 1”

alias: Lüfter Gäste WC - aus
description: ""
trigger:
  - platform: state
    entity_id:
      - input_select.luftung_gaste_wc
    to: Aus
condition: []
action:
  - type: turn_off
    device_id: 3ba636f1413300a91f6e5afefb9f50fc
    entity_id: d3c5544677ebc24c46e0d113ff7b85b1
    domain: switch
  - type: turn_off
    device_id: 3ba636f1413300a91f6e5afefb9f50fc
    entity_id: d3c5544677ebc24c46e0d113ff7b85b1
    domain: switch
mode: single




alias: Lüfter Gäste WC - Stufe 1
description: ""
trigger:
  - platform: state
    entity_id:
      - input_select.luftung_gaste_wc
    to: Stufe 1
condition: []
action:
  - type: turn_on
    device_id: 3ba636f1413300a91f6e5afefb9f50fc
    entity_id: d3c5544677ebc24c46e0d113ff7b85b1
    domain: switch
  - type: turn_off
    device_id: 3ba636f1413300a91f6e5afefb9f50fc
    entity_id: a753e83ec3d37620f5fa5ce9f1cae9c1
    domain: switch
mode: single

How can I convert it to a single automation ?

Does it mean I need an input number from 0 … 3 → and then trigger the automation by this change ?