mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
blue_room to boys_room
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
script:
|
||||
light_cycle:
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
- action: homeassistant.turn_on
|
||||
entity_id: light.front_room_hue
|
||||
data_template:
|
||||
brightness: 250
|
||||
@@ -10,16 +10,16 @@ script:
|
||||
{{ colors|random }}
|
||||
transition: 1
|
||||
# Wait until the loop_lights script has finished running
|
||||
- delay: '00:00:02'
|
||||
- delay: "00:00:02"
|
||||
- wait_template: "{{ is_state('script.loop_lights', 'off') }}"
|
||||
- service: script.loop_lights
|
||||
- action: script.loop_lights
|
||||
|
||||
loop_lights:
|
||||
sequence:
|
||||
- delay: '00:00:02'
|
||||
- delay: "00:00:02"
|
||||
# Wait until the light_cycle script has finished running
|
||||
- wait_template: "{{ is_state('script.light_cycle', 'off') }}"
|
||||
- service: script.light_cycle
|
||||
- action: script.light_cycle
|
||||
|
||||
automation:
|
||||
- alias: Light Cycle Start
|
||||
@@ -27,43 +27,43 @@ automation:
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.front_room_light_cycle
|
||||
to: 'on'
|
||||
to: "on"
|
||||
action:
|
||||
- service: input_text.set_value
|
||||
- action: input_text.set_value
|
||||
# Again, note the use of 'data_template:' rather than the normal 'data:' if you weren't using an input variable.
|
||||
data_template:
|
||||
entity_id: input_text.front_room_mode
|
||||
value: "{{ states('input_select.front_room_mode') }}"
|
||||
|
||||
- service: input_select.select_option
|
||||
- action: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.front_room_mode
|
||||
option: 'Off'
|
||||
- service: script.light_cycle
|
||||
option: "Off"
|
||||
- action: script.light_cycle
|
||||
|
||||
- alias: Light Cycle Stop
|
||||
id: automation_light_cycle_stop
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.front_room_light_cycle
|
||||
to: 'off'
|
||||
to: "off"
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
- action: homeassistant.turn_off
|
||||
entity_id:
|
||||
- script.light_cycle
|
||||
- script.loop_lights
|
||||
|
||||
- service: input_select.select_option
|
||||
- action: input_select.select_option
|
||||
data_template:
|
||||
entity_id: input_select.front_room_mode
|
||||
option: "{{ states('input_text.front_room_mode') }}"
|
||||
|
||||
- service: input_boolean.toggle
|
||||
- action: input_boolean.toggle
|
||||
data:
|
||||
entity_id: input_boolean.front_room_occupied
|
||||
|
||||
- delay: '00:00:01'
|
||||
- delay: "00:00:01"
|
||||
|
||||
- service: input_boolean.toggle
|
||||
- action: input_boolean.toggle
|
||||
data:
|
||||
entity_id: input_boolean.front_room_occupied
|
||||
entity_id: input_boolean.front_room_occupied
|
||||
|
||||
Reference in New Issue
Block a user