update lr cover

This commit is contained in:
Georgi Gardev
2023-11-04 13:25:09 +02:00
parent fdf915e023
commit 74fe4bce78
4 changed files with 9 additions and 16 deletions

View File

@@ -1,7 +1,2 @@
v3_button_cover:
template: [v3_button, cover]
state_display: |
[[[
if (entity?.state === 'closed') { return 'Closed' }
return entity?.attributes?.current_position + '% Open';
]]]

View File

@@ -1,19 +1,18 @@
script:
open_living_room_cover:
sequence:
- service: cover.set_cover_position
- service: cover.open_cover
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) }}"
- conditions: "{{ is_state('cover.living_room', 'closed') }}"
sequence:
- service: script.open_living_room_cover
- service: cover.open_cover
entity_id: cover.living_room
- conditions: >-
{{ state_attr('cover.living_room', 'current_position') >= 80 }}
{{ is_state('cover.living_room', 'open') }}
sequence:
- service: cover.close_cover
entity_id: cover.living_room

View File

@@ -41,7 +41,8 @@ automation:
- media_player.nvidia_shield
button_3_double:
- service: script.sonos_join_tv
- service: cover.close_cover
entity_id: cover.living_room
button_3_triple:
- service: script.sonos_join_bedroom
@@ -57,9 +58,8 @@ automation:
- media_player.nvidia_shield
button_4_double:
- service: script.music_play
data:
playlist: 'Starred'
- service: cover.open_cover
entity_id: cover.living_room
button_4_triple:
- service: script.music_play

View File

@@ -63,4 +63,3 @@ vacuum_password: pass
github_access_token: Basic token
air_visual_key: key
waqi_key: key