fix garage gate not working properly
This commit is contained in:
20
cover.yaml
20
cover.yaml
@@ -2,29 +2,31 @@
|
|||||||
covers:
|
covers:
|
||||||
garage_door:
|
garage_door:
|
||||||
device_class: garage
|
device_class: garage
|
||||||
friendly_name: "Garage Door"
|
friendly_name: "Garagem Portao"
|
||||||
position_template: "{{ is_state('binary_sensor.portao_garagem_input') }}"
|
value_template: "{{is_state('binary_sensor.portao_garagem_input','On')}}"
|
||||||
open_cover:
|
open_cover:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.portao_garagem_input
|
entity_id: binary_sensor.portao_garagem_input
|
||||||
state: "off"
|
state: "off"
|
||||||
- service: switch.turn_off
|
- service: switch.toggle
|
||||||
target:
|
target:
|
||||||
entity_id: switch.portao_garagem
|
entity_id: switch.portao_garagem
|
||||||
close_cover:
|
close_cover:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.portao_garagem_input
|
entity_id: binary_sensor.portao_garagem_input
|
||||||
state: "on"
|
state: "on"
|
||||||
- service: switch.turn_on
|
- service: switch.toggle
|
||||||
target:
|
target:
|
||||||
entity_id: switch.portao_garagem
|
entity_id: switch.portao_garagem
|
||||||
stop_cover:
|
stop_cover:
|
||||||
service: switch.turn_on
|
- service: switch.toggle
|
||||||
target:
|
target:
|
||||||
entity_id: switch.portao_garagem
|
entity_id: switch.portao_garagem
|
||||||
icon_template: >-
|
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
|
mdi:garage-open
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:garage
|
mdi:garage-alert-variant
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user