• walden@sub.wetshaving.social
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Garages just need a momentary dry-contact switch wired up where the button is (or you can get a ladder and place it closer to the motor).

    I use a Sonoff 4CH Pro which could do up to 4 garage doors. Surely there are other dry contact options, but that’s the one I use.

    It’s flashed with Tasmota, and each switch is set to stay on for a fraction of a second, like a button press.

    For sensors I use z-wave door sensors. The magnet is taped to the door, and the sensor is installed above it. I copied and pasted some yaml from somewhere to make Home Assistant display everything properly. It’s pretty slick!

    This is in my covers.yaml file (referenced from config.yaml, of course).

            garage_1:
              friendly_name: Garage 1
              device_class: garage
              value_template: "{{ is_state('binary_sensor.garage_1', 'on') }}"
              open_cover:
                - condition: state
                  entity_id: binary_sensor.garage_1
                  state: "off"
                - service: switch.turn_on
                  target:
                    entity_id: switch.garage_1_toggle
              close_cover:
                - condition: state
                  entity_id: binary_sensor.garage_1
                  state: "on"
                - service: switch.turn_on
                  target:
                    entity_id: switch.garage_1_toggle
              stop_cover:
                service: switch.turn_on
                target:
                  entity_id: switch.garage_1_toggle
              icon_template: >-
                {% if is_state('binary_sensor.garage_1', 'on') %}
                  mdi:garage-open
                {% else %}
                  mdi:garage
                {% endif %}