I am trying to create an light-alaram-clock.
So what I want is that at a certain time of the day, my lights turn on at 1%.
Then 5 minutes later it should increase to 5%, an other 5 minutes later to 10%
But if I get up and manually change the light to be off again f.e. or to 100%, the automation should stop.
So I thought I just read the status of the light using a current state node, but this will only tell me it if’s on or off, but not the brightness level.
Can anybody tell me how this is done?
Oh… and while I am here… I guess I’ll use the Big-Timer for the time-based event? But I cant set an exact time there. Only in increments of 15minutes. And I also have to define an off time?
Isn’t there something simpler?
I also found a light-scheduler-node but there it’s also only in 15 minutes increments (but with nicer UI to configure)
So but the main question is… how can I get the current brightness-level of a light from home-assistant into node-red?
When you consult a ha entity light state, attributes are displayed in the msg also. Just grab a current state node put you light entity, put an inject node in the input and debug node (complete msg object) in the output and you will see when you press the inject button.
For accessing then the brightness attribute in a switch node you use the js dot notation
If you have a debug-node make sure to check the Output. Make sure it says complete msg object.
I didn’t see that before, but if it’s set like this you should be able to see all properties.