This commit is contained in:
Victor Alexandrovich Tsyrenschikov
2025-10-04 15:13:00 +05:00
parent d88e8f291e
commit d3fbb28472
2 changed files with 19 additions and 0 deletions

18
switches.yaml Normal file
View File

@@ -0,0 +1,18 @@
- platform: template
switches:
garage:
value_template: "{{ is_state('cover.garage_door', 'on') }}"
turn_on:
service: cover.open_cover
data:
entity_id: cover.garage_door
turn_off:
service: cover.close_cover
data:
entity_id: cover.garage_door
icon_template: >-
{% if is_state('cover.garage_door', 'open') %}
mdi:garage-open
{% else %}
mdi:garage
{% endif %}