3 position ventilation switch

I have a Zehnder ventilation system with a wired 3 position switch.
This is used for setting the speed of the ventilation.
It has 3 wires (connected to terminals 1, 2, 4)
Wire 1 is connected to power (220v)

Position 1 : wires not connected
Position 2 : wire 1-2 connected
Position 3 : wire 1-2-4 connected
image

is there an easy way to automate this ?
I think a Shelly 2 PM, Because it has 2 outputs,
Position 1 : both O1 & O2 open
Position 2 : O1 closed & O2 open
Position 3 : both O1 & O2 closed

but thenā€¦ ?
How do I put this in HA? I want to have a visual option ā€˜low/mid/highā€™ in the UI, so I can set it as I want.
Or it needs to run automated. So how do I do this ? some kind of helper?

Or is there better hardware, or a better way to do this ?

Erwin

1 Like

Try the following:
Replace the wired 3-way switch with a 2 Gang Zigbee Switch.
(TuYa TS0002_switch_module control via MQTT | Zigbee2MQTT)
Add the switch to your HA (Z2M) and name it: ā€œZehnder RPMeā€
Connect the switch with the following wires:
L2 with the BLACK wire, L1 with the GRAY wire, L with the BROWN wire and N with the BLUE wire.

Create an automation (package):

# TuYa - 2 Gang Switch Module (TS0002_switch_module)
#   L2  L   L1  N   S1  S2
#---O---O---O---O---X---X---
#   Zw  Br  Gs  Bl  x   x
# Zehnder RPM(e) Dakventilator

template:
  - sensor:
      - name: Fan speed
        unique_id: fan_speed
        state: >
          {% if is_state("switch.zehnder_rpme_l2", "on") %}
            {% if is_state("switch.zehnder_rpme_l1", "on") %}
              HIGH / med / low
            {% else %}
              high / MED / low
            {% endif %}
          {% else %}
            high / med / LOW
          {% endif %}


automation:
  - alias: Badkamer fan control
    description: |-
      Low    <50 or 22h (L2+L1_off)
      Medium >=50 <70 between 8-22h (L2_on/L1_off)
      High   >=70 between 8-22h (L2+L1_on)
    trigger:
      - platform: state
        entity_id: sensor.badkamer_thp_humidity
      - platform: time
        at: "21:30:00"
    action:
      - variables:
          humi: '{{ states("sensor.badkamer_thp_humidity") }}'
      - choose:
          - conditions:
              - or:
                  - '{{ humi < 50 }}'
                  - '{{ trigger.platform == "time" }}' # "nacht" mode
            sequence:
              - service: switch.turn_off
                target:
                  entity_id:
                    - switch.zehnder_rpme_l2
                    - switch.zehnder_rpme_l1
          - conditions:
              - '{{ "08:00" <= now().strftime("%H:%M") < "21:30" }}'
              - '{{ is_state("binary_sensor.iemand_thuis", "on") }}'
            sequence:
              - service: switch.turn_on
                target:
                  entity_id: switch.zehnder_rpme_l2
              - service: switch.turn_{{ iif(humi >= 70, "on", "off") }}
                target:
                  entity_id: switch.zehnder_rpme_l1

The automation works as follows:
If the humidity is lower than 50%, or time is between 9:30 PM and 8:00 AM, the fan will run at low speed; if the humidity is higher than 70%, the fan will run at high speed. The fan runs at medium speed if the humidity is between 50-70%.
As a humidity sensor I use a Xiaomi WSDCGQ11LM (t/h/p) device.
The ā€œFan speedā€ sensor displays the speed.

You can adjust it where necessary.

2 Likes

Thanks @complex1,

I have used your advise to automate my Zehnde RPMe for OFF, LOW, MED and HIGH. I am using 2 Shelly 2PMā€™s.

Automation:

---
alias: Badkamer fan control
id: c0cf100a-d2e0-45cb-b628-f3d56020ea2b
description: |-
  Off    <63
  Low    >=63 <70 or 22h 
  Medium >=70 <80 between 8-22h 
  High   >=80 between 8-22h 
  
     1 2 3 (shelly 2 PM's)
  0  x x x
  1  v x x
  2  v v x
  3  v x v


trace:
  stored_traces: 20

trigger:
  - platform: state
    entity_id: sensor.badkamer_xiaomi_humidity
  - platform: time
    at: "21:30:00"
action:
  - variables:
      humi: '{{ states("sensor.badkamer_xiaomi_humidity") }}'
  - choose:
      - conditions:
          - or:
              - '{{ humi < 63 }}'
              - '{{ trigger.platform == "time" }}' # "nacht" mode
        sequence:
          - service: switch.turn_off
            target:
              entity_id:
                - switch.zehnder_rpm_1 # uit/low
                - switch.zehnder_rpm_2 # med
                - switch.zehnder_rpm_3 # high

      - conditions:
          - '{{ "07:00" <= now().strftime("%H:%M") < "21:30" }}'
#              - '{{ is_state("binary_sensor.iemand_thuis", "on") }}'
        sequence:
          - service: switch.turn_{{ iif(humi >= 63, "on", "off") }}
            target:
              entity_id: switch.zehnder_rpm_1
          - service: switch.turn_{{ iif(humi >= 70 and humi < 80, "on", "off") }}
            target:
              entity_id: switch.zehnder_rpm_2
          - service: switch.turn_{{ iif(humi >= 80, "on", "off") }}
            target:
              entity_id: switch.zehnder_rpm_3                 

Template sensor:

---
- name: badkamer ventilator snelheid
  unique_id: fan_speed
  state: >
    {% if is_state("switch.zehnder_rpm_1", "on") %}
      {% if is_state("switch.zehnder_rpm_2", "on")  %}
        MED
      {% else %}
        {% if is_state("switch.zehnder_rpm_3", "on")  %}
          HIGH
        {% else %}
          LOW
        {% endif %}
      {% endif %}
    {% else %}
      OFF
    {% endif %}