Two switches into one open/close switch or cover switch

Hi,

I have a cover for my pool which can be opened and closed by 2 separate switch entities.

Is it possible to combine these 2 switches into one entity like for instance a cover entity or other open/close entity type.

Thanks in advance,

Rien

Yes, with this:

Thanks

Got it up and running :slight_smile:

Hi can you please share your results? I don’t understand how to do this. I have Aqara Relay Controller devices. They have just 2 “switches” and want them to combine in one “cover” switch.
Thank you!

Here you go…

cover:
  - platform: template
    covers:
      zwembad_deck:
        device_class: shutter
        friendly_name: "Zwembad Deck"
        open_cover:
          service: script.zwembad_deck_open
        close_cover:
          service: script.zwembad_deck_dicht

Script:

alias: Zwembad Deck Open
sequence:
  - if:
      - condition: state
        entity_id: switch.casa_du_pre_relay_zwembad_deck_open
        state: "off"
    then:
      - service: switch.turn_off
        data: {}
        target:
          entity_id: switch.casa_du_pre_relay_zwembad_deck_dicht
      - delay:
          hours: 0
          minutes: 0
          seconds: 10
          milliseconds: 0
      - service: switch.turn_on
        data: {}
        target:
          entity_id: switch.casa_du_pre_relay_zwembad_deck_open
mode: single