Hi @123
This is my lounge motion, which is the same as everywhere else in most ways.
- id: '1585417563603'
alias: Turn On Lounge Light when motion detected
description: ''
trigger:
- device_id: 0310800ab747484283cf6fb58715fb0d
domain: binary_sensor
entity_id: binary_sensor.lounge_motion
platform: device
type: motion
condition:
- condition: or
conditions:
- before: sunrise
condition: sun
- after: sunset
condition: sun
- condition: state
entity_id: input_boolean.ambient_mode
state: 'Off'
action:
- data: {}
entity_id: light.lounge
service: light.turn_on
- data:
entity_id: timer.lounge
service: timer.cancel
- data:
duration: 00:02:00
entity_id: timer.lounge
service: timer.start
mode: single
This is the off automation:
- id: '1585418369243'
alias: Turn Off Lounge Light when there is no motion
description: ''
trigger:
- event_data:
entity_id: timer.lounge
event_type: timer.finished
platform: event
action:
- data: {}
entity_id: light.lounge
service: light.turn_off
I thought one way I could do the lamps and lights based on the toggle would be have two separate automations by inverting the toggle value on the condition.
But I wonder if I can do some kind of if toggle On then lamp else light.
Also very interested in trimming some of the repetition.
I’ve got every light and lamp controllable now, so the repetition is a little annoying and makes find and tweaking things a bit more difficult. Also I guess the feedback from my current setup is that I need to develop my light automations to be a little bit more sophisticated.
For example if you’re sat watching TV, it’s good to have the lamp on and you don’t want it turning off as you are probably sat still. You also don’t want the main light coming on every time you move. I guess I could tell alexa I’m watch TV and she set’s a toggle in home assistant, or maybe its possible to use some status from my fire stick.
The other scenario is when I’m in bed, so every room has motion sensors controlling the lights. I have some routines for “Alexa, I’m getting ready for bed” and “Alexa, good night”. But I think once the latter has been said then motion events shouldn’t turn on light, especially the bedroom light (the Mrs really wasn’t pleased).
But then like everything there are exceptions, whilst some can be dealt with by asking Alexa to turn something on which works for ad lib scenarios. The least manual intervention, the better really. But there are always those dilemmas such as going to the bathroom in the middle of the night. If I disable the motion sensor after saying “Alexa, good night”, then do I have to say “Alexa, turn on the light” or “Alexa, I’m going to the bathroom”, or is me talking to Alexa going to disturb other people. I don’t have the answer to some of these questions, not do I expect you to, but I would be interested to know how people have dealt with some of these common scenarios and how sophisticated or simple of a solution they have come up with.