Im making my way through all of the lighting automations in my home, and trying to make it modular as possible so I can add to it later. Right now the idea is to have an Input_Select for each room, which controls the rooms mode (Automatic, Morning, Away, Sleep, Party, Vacation, and Manual). The house itself has another Input_select with most of the same values, that when changed automatically moves the other rooms into the corresponding mode.
For motion lighting, I am running a simple automation to turn a group of lights/switches on. No scene activation included.
alias: Motion Livingroom Lights
trigger:
platform: state
entity_id: binary_sensor.lr_motion_sensor
to: 'on'
action:
service: homeassistant.turn_on
entity_id: group.all_living_room_lights
To turn them off I have two automations. The only difference is the timer, which is linked to the mode.
alias: Kitchen Lights Off 5
trigger:
- platform: state
entity_id: binary_sensor.kitchen_motion_sensor
to: 'off'
for:
minutes: 5
condition:
condition: or
conditions:
- condition: state
entity_id: 'input_select.kitchen_override'
state: 'Automatic'
- condition: state
entity_id: 'input_select.kitchen_override'
state: 'Morning'
- condition: state
entity_id: 'input_select.kitchen_override'
state: 'Manual'
action:
- service: homeassistant.turn_off
entity_id: group.kitchen_lights
alias: Kitchen Lights Off 2
trigger:
- platform: state
entity_id: binary_sensor.kitchen_motion_sensor
to: 'off'
for:
minutes: 2
condition:
condition: or
conditions:
- condition: state
entity_id: 'input_select.kitchen_override'
state: 'Sleep'
- condition: state
entity_id: 'input_select.kitchen_override'
state: 'Away'
- condition: state
entity_id: 'input_select.kitchen_override'
state: 'Movie'
action:
- service: homeassistant.turn_off
entity_id: group.kitchen_lights
I will be using another set of automations that change the scene depending on the mode selected for the room in the Input_Select. Here is where I run into the issue.
As far as I know scenes can not be activated while keeping the lights off, IE the scene itself turns the lights on.
Likewise the automation to turn the light off is triggered by the motion sensor moving INTO the off state.
So if I have automations setup that change the scene in the house based on other triggers, there is a good chance that it will turn the lights ON in a room where there is no motion. Since the turn off automation is based on the state of the motion sensor turning OFF, that means the lights are going to stay on until someone trips the motion sensor and then allows it to move into the OFF state.
From what I understand LIFX allows for scenes to be sent to the bulbs even if they are in the off state (not working for me yet), but that would only account for my living room. Every other room in the house is a mix of GE Switches, Cree bulbs and Lightify Color bulbs.
Does anyone have any suggestions? Either a different way to write the “Turn Off” automation, or something I dont understand about Scenes?