276
submitted 1 year ago* (last edited 1 year ago) by dmtalon@infosec.pub to c/homeassistant@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] walden@sub.wetshaving.social 6 points 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 %}
this post was submitted on 07 Nov 2023
276 points (99.6% liked)

homeassistant

11921 readers
3 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS