diff --git a/config/packages/devices/living_room/cover.yaml b/config/packages/devices/living_room/cover.yaml index 91f59d6..00818d8 100644 --- a/config/packages/devices/living_room/cover.yaml +++ b/config/packages/devices/living_room/cover.yaml @@ -1,14 +1,18 @@ 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: > {{ state_attr('cover.living_room', 'current_position') == 0 }} sequence: - - service: cover.set_cover_position - entity_id: cover.living_room - data: - position: 80 + - service: script.open_living_room_cover - conditions: > {{ state_attr('cover.living_room', 'current_position') >= 80 }} sequence: @@ -25,10 +29,7 @@ automation: platform: time at: "10:00:00" action: - - service: cover.set_cover_position - entity_id: cover.living_room - data: - position: 80 + - service: script.open_living_room_cover - alias: Cover · Living Room · Close after sunset trigger: diff --git a/config/packages/routines/coming_home.yaml b/config/packages/routines/coming_home.yaml index 4b13b0f..4bba73b 100644 --- a/config/packages/routines/coming_home.yaml +++ b/config/packages/routines/coming_home.yaml @@ -52,11 +52,7 @@ script: after: sunrise - condition: sun before: sunset - - service: cover.set_cover_position - entity_id: cover.living_room - data: - position: 80 - + - service: script.open_living_room_cover routine_coming_home_after_sunset: alias: Routine · Coming home · After sunset diff --git a/config/packages/routines/waking_up.yaml b/config/packages/routines/waking_up.yaml index 50490fe..97cc585 100644 --- a/config/packages/routines/waking_up.yaml +++ b/config/packages/routines/waking_up.yaml @@ -26,11 +26,7 @@ script: - light.bed_led - light.bedside - - service: cover.set_cover_position - entity_id: cover.living_room - data: - position: 80 - + - service: script.open_living_room_cover - service: script.shield_screensaver - condition: state diff --git a/config/packages/sensors/meeting.yaml b/config/packages/sensors/meeting.yaml index 3fca825..20a97f6 100644 --- a/config/packages/sensors/meeting.yaml +++ b/config/packages/sensors/meeting.yaml @@ -33,9 +33,6 @@ automation: from: "off" to: "on" action: - - service: cover.set_cover_position - entity_id: cover.living_room - data: - position: 80 + - service: script.open_living_room_cover - service: input_boolean.turn_on entity_id: input_boolean.speech_notifications