I have a hallway in my house that has no natural light, just doors off it. I’ve installed an Everything Presence Lite and a Hue light. I’ve got the automation working correctly, but cannot see how to enhance it. I’ve used the ‘create automation’ in settings/automations. What I’ve got working is light comes on at 22:00 at 4% brightness. At 06:00 and until 22:00 if presence is detected it turns the light on at 60%. Once no presence detected it is turned off.
I have three very simple automations (Hall_Light_Day_Presence, Hall_Light_Day_nopresence and Hall_Night On). They seem to work just fine, however, the way I have done it I can only control the light On, Off and % brightness. I’d really like to be able to change colour as well. I think(?) I might be able to edit the YAML to add the colour but is that the best way? As I went down the route of using the menus I was reluctant to then edit the YAML but very happy to take advice.
Here are my three automations, there did not seem to be an option for colour using the graphic interface, I’m guessing I could key it into the YAML if there is an option:
Ok, you’re using device actions so you’re not gonna see the colour options.
I don’t blame you because it’s described as a “great way to start” in the UI, but doesn’t really mention that it’s very simplified.
Read this to understand why you should be using state actions instead.
When you’re done, have a look at this post of mine showing the difference in options between device & state actions
Thanks you for this. I’ve had a look through the two referenced posts and need to work through them some more.
In the meantime I had a look at some other automations I have, mainly turning Hue lights on with Hue switches. They’re all Device related, I have some work to do to ‘correct’ them all. May take a few days to get it clear in my mind and make the changes.
I have a hallway and have it set up fairly similar to yours.
Except that I use scenes for each of the conditions daytime, night and off
In the case of the hallway the off scene isn’t that useful since it could only ever be one setting, however it’s a pattern I use for all my rooms, so in those cases I can turn off multiple lights by activating the off scene.
Anyway, using scenes means that I never need to edit the automations just to change how the scene looks - I can open the scene “live edit” mode and setup all the lights how I want them (color / brightness) then just save the scene.
TL;DR - I don’t ever change lights directly, from any of my automations I always activate scenes.
PS I actually go one step further than this and have a input select for each room with all the scenes for that room listed, as that way I know which scene is currently active.
So the actual sequence I use is:
Sensor event happens.
An automation runs which changes the “room scene” input_select.
An automation (on the input_select) runs which activates a scene.
The scene actually changes the light.
PPS I also have another text input which remembers the last “not off” scene so that I can toggle lights on/off easily (toggle between the last scene and off).