mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-13 19:54:42 +00:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
script:
|
|
open_living_room_cover:
|
|
sequence:
|
|
- service: cover.set_cover_position
|
|
entity_id: cover.living_room
|
|
data:
|
|
position: "{{ position | default(80) }}"
|
|
|
|
toggle_living_room_cover:
|
|
sequence:
|
|
- choose:
|
|
- conditions: "{{ is_state_attr('cover.living_room', 'current_position', 0) }}"
|
|
sequence:
|
|
- service: script.open_living_room_cover
|
|
- conditions: >-
|
|
{{ state_attr('cover.living_room', 'current_position') >= 80 }}
|
|
sequence:
|
|
- service: cover.close_cover
|
|
entity_id: cover.living_room
|
|
default:
|
|
- service: cover.close_cover
|
|
entity_id: cover.living_room
|
|
|
|
|
|
automation:
|
|
- alias: Cover · Living Room · Open at morning
|
|
trigger:
|
|
platform: time
|
|
at: "10:00:00"
|
|
action:
|
|
- service: script.open_living_room_cover
|
|
|
|
- alias: Cover · Living Room · Close after sunset
|
|
trigger:
|
|
platform: sun
|
|
event: sunset
|
|
action:
|
|
- service: cover.close_cover
|
|
entity_id: cover.living_room
|