mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
nursery to girls room... finally
This commit is contained in:
@@ -14,8 +14,8 @@ trigger:
|
||||
- platform: state
|
||||
id: light_level
|
||||
entity_id: binary_sensor.master_bedroom_naturally_lit
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
from: "on"
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
@@ -45,7 +45,6 @@ condition:
|
||||
- alias: "Check if light should turn on"
|
||||
condition: or
|
||||
conditions:
|
||||
|
||||
- alias: "Guest mode is on"
|
||||
condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
@@ -57,7 +56,7 @@ condition:
|
||||
- alias: "Light level below trigger amount"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bedroom_naturally_lit
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
- alias: "Motion or occupancy were detected"
|
||||
condition: or
|
||||
@@ -78,7 +77,7 @@ condition:
|
||||
state: "on"
|
||||
|
||||
variables:
|
||||
switch_name: light.master_bedroom_dimmer_light
|
||||
switch_name: light.master_bedroom_fan_light_switch_light
|
||||
light_name: master_bedroom_hue
|
||||
mode_name: input_select.master_bedroom_mode
|
||||
automatic_profile: input_select.automatic_light_profile
|
||||
@@ -89,109 +88,109 @@ action:
|
||||
target:
|
||||
entity_id: "{{ switch_name }}"
|
||||
- choose:
|
||||
- alias: "If the room is set to manual, just turn the lights on"
|
||||
conditions:
|
||||
- alias: "Room set to manual"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Manual
|
||||
sequence:
|
||||
- action: light.turn_on
|
||||
target:
|
||||
- alias: "If the room is set to manual, just turn the lights on"
|
||||
conditions:
|
||||
- alias: "Room set to manual"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Manual
|
||||
sequence:
|
||||
- action: light.turn_on
|
||||
target:
|
||||
entity_id: light.master_bedroom_hue
|
||||
|
||||
- alias: "If the room is set to auto, the lights are on, and the automatic profile is set to Nightlight, change to the Automatic Light Profile scene with a short transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: "on"
|
||||
- alias: "Automatic light profile set to Nightlight"
|
||||
condition: state
|
||||
entity_id: input_select.automatic_light_profile
|
||||
state: Nightlight
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: 10
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is set to auto, the lights are on, and the automatic profile is set to Nightlight, change to the Automatic Light Profile scene with a short transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
- alias: "Automatic light profile set to Nightlight"
|
||||
condition: state
|
||||
entity_id: input_select.automatic_light_profile
|
||||
state: Nightlight
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: 10
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is set to auto and the lights are on, change to the Automatic Light Profile scene with a transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: "on"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states('input_number.light_scene_transition') }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is set to auto and the lights are on, change to the Automatic Light Profile scene with a transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states('input_number.light_scene_transition') }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is set to auto and the lights are off, change to the Automatic Light Profile scene without a transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are off"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: "off"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is set to auto and the lights are off, change to the Automatic Light Profile scene without a transition"
|
||||
conditions:
|
||||
- alias: "Room set to auto"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Auto
|
||||
- alias: "Lights are off"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'off'
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(automatic_profile).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is not set to auto, the lights are on, and the room is set to Nightlight change to the Master Bedroom Mode scene with a short transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: "on"
|
||||
- alias: "Room set to Nightlight"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Nightlight
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: 10
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is not set to auto, the lights are on, and the room is set to Nightlight change to the Master Bedroom Mode scene with a short transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
- alias: "Room set to Nightlight"
|
||||
condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: Nightlight
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: 10
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene with a transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: "on"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states('input_number.light_scene_transition') }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene with a transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are on"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'on'
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
data:
|
||||
transition: "{{ states('input_number.light_scene_transition') }}"
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene without a transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are off"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: "off"
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- alias: "If the room is not set to auto and the lights are on, change to the Master Bedroom Mode scene without a transition"
|
||||
conditions:
|
||||
- alias: "Room not manual or auto and lights are off"
|
||||
condition: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
state: 'off'
|
||||
sequence:
|
||||
- action: scene.turn_on
|
||||
target:
|
||||
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
|
||||
|
||||
- delay: 1
|
||||
- delay: 1
|
||||
|
||||
Reference in New Issue
Block a user