Skip to content

Commit

Permalink
Allow home office mode switch via toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Kissling committed Apr 13, 2024
1 parent 5e3a5ea commit 8079400
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions automations/modes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@
- service: light.turn_on
entity_id: light.study_desk
data:
color_name: "{{ 'green' if trigger.to_state.state == 'single' else 'red' }}"
color_name: "{{ 'green' if is_state('input_boolean.home_office_mode', 'off') else 'red' }}"
- service: input_boolean.toggle
entity_id: input_boolean.home_office_mode
- service: light.turn_on
entity_id: light.study_desk
data:
flash: short
- delay: 1
- service: "input_boolean.turn_{{ 'on' if trigger.to_state.state == 'single' else 'off' }}"
entity_id: input_boolean.home_office_mode
- delay: 3
- service: light.turn_on
entity_id: light.study_desk
data:
color_temp_kelvin: "{{ state_attr('sensor.light_study_desk', 'color_temp_kelvin') }}"

- alias: Mode - Party Mode - Turn off after 4 hours
trigger:
Expand Down

0 comments on commit 8079400

Please sign in to comment.