diff --git a/config/lovelace/home_dashboard/bedroom_dashboard.yaml b/config/lovelace/home_dashboard/bedroom_dashboard.yaml index ced210e..8d9674f 100644 --- a/config/lovelace/home_dashboard/bedroom_dashboard.yaml +++ b/config/lovelace/home_dashboard/bedroom_dashboard.yaml @@ -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: diff --git a/config/packages/devices/bedroom/bedside_switch.yaml b/config/packages/devices/bedroom/bedside_switch.yaml index 9cdc9ad..816bbc0 100644 --- a/config/packages/devices/bedroom/bedside_switch.yaml +++ b/config/packages/devices/bedroom/bedside_switch.yaml @@ -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 diff --git a/config/packages/modes/house_mode.yaml b/config/packages/modes/house_mode.yaml index 7e5ca02..43440c9 100644 --- a/config/packages/modes/house_mode.yaml +++ b/config/packages/modes/house_mode.yaml @@ -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: