fix garage gate not working properly

This commit is contained in:
2022-02-16 23:23:11 +00:00
parent 07ec7af140
commit 1a01aa6d1b

View File

@@ -2,29 +2,31 @@
covers:
garage_door:
device_class: garage
friendly_name: "Garage Door"
position_template: "{{ is_state('binary_sensor.portao_garagem_input') }}"
friendly_name: "Garagem Portao"
value_template: "{{is_state('binary_sensor.portao_garagem_input','On')}}"
open_cover:
- condition: state
entity_id: binary_sensor.portao_garagem_input
state: "off"
- service: switch.turn_off
- service: switch.toggle
target:
entity_id: switch.portao_garagem
close_cover:
- condition: state
entity_id: binary_sensor.portao_garagem_input
state: "on"
- service: switch.turn_on
- service: switch.toggle
target:
entity_id: switch.portao_garagem
stop_cover:
service: switch.turn_on
target:
entity_id: switch.portao_garagem
- service: switch.toggle
target:
entity_id: switch.portao_garagem
icon_template: >-
{% if is_state('binary_sensor.portao_garagem_input','off') %}
{% if is_state('binary_sensor.portao_garagem_input','on') %}
mdi:garage
{% elif is_state('binary_sensor.portao_garagem_input','off') %}
mdi:garage-open
{% else %}
mdi:garage
mdi:garage-alert-variant
{% endif %}