mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-15 17:12:59 +00:00
Helper for bedtime mode switching
This commit is contained in:
@@ -168,9 +168,7 @@
|
||||
name: Mode
|
||||
tap_action:
|
||||
action: call-service
|
||||
service: input_select.select_next
|
||||
service_data:
|
||||
entity_id: input_select.bedroom_mode
|
||||
service: script.toggle_bedroom_mode
|
||||
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
|
||||
@@ -47,5 +47,4 @@ automation:
|
||||
brightness_pct: "{{ is_state('input_select.bedroom_mode', 'night') | iif(40, 100)}}"
|
||||
|
||||
hold:
|
||||
- service: input_select.select_next
|
||||
entity_id: input_select.bedroom_mode
|
||||
- service: script.toggle_bedroom_mode
|
||||
|
||||
@@ -61,6 +61,15 @@ sensor:
|
||||
{% endif %}
|
||||
|
||||
|
||||
script:
|
||||
toggle_bedroom_mode:
|
||||
alias: Toggle bedroom mode
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.bedroom_mode
|
||||
data_template:
|
||||
option: "{{ is_state('input_select.bedroom_mode', 'day') | iif('night', 'day') }}"
|
||||
|
||||
automation:
|
||||
- alias: Bedroom mode · Set to day
|
||||
trigger:
|
||||
|
||||
Reference in New Issue
Block a user