Skip to content

Instantly share code, notes, and snippets.

@robinsmidsrod
Created September 13, 2023 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robinsmidsrod/918f972c690f5d15d3d93f8b6a37002d to your computer and use it in GitHub Desktop.
Save robinsmidsrod/918f972c690f5d15d3d93f8b6a37002d to your computer and use it in GitHub Desktop.
garate gate cover
cover:
- platform: template
covers:
garage_gate:
device_class: garage
friendly_name: "Garage Gate"
value_template: |
{% if is_state('binary_sensor.garage_gate', 'off') %}
closed
{% else %}
open
{% endif %}
icon_template: |
{% if is_state('binary_sensor.garage_gate', 'off') %}
mdi:garage
{% else %}
mdi:garage-open
{% endif %}
open_cover:
service: switch.turn_on
data:
entity_id: switch.garage_gate_motor
close_cover:
service: switch.turn_on
data:
entity_id: switch.garage_gate_motor
stop_cover:
service: switch.turn_on
data:
entity_id: switch.garage_gate_motor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment