Hi there,
I am struggeling to get the hang of my garage door.
I’m using two mqtt reed switches to report the positions up (garagerechtsoben_contact) or down (garagerechtsoben_contact).
This works as a charm. But I can’t figure out, how to detect the “rising edge” from a sensor from off to on, and chose the appropiate “closing” or “opening” state.
Can anybody help me?
Thank you!
- platform: template
covers:
garage_door:
device_class: garage
friendly_name: "Rechte Garage"
unique_id: "rechteGarage"
value_template: >
{% if is_state('binary_sensor.garagerechtsunten_contact', 'off') %}
closed
{% elif is_state('binary_sensor.garagerechtsoben_contact', 'off') %}
open
{% else %}
closing #this bit right here
{% endif %}
open_cover:
- service: switch.turn_on
target:
entity_id: switch.shelly_garage
close_cover:
- service: switch.turn_on
target:
entity_id: switch.shelly_garage
2 posts - 2 participants