#Help with dusk to dawn automation

1 messages ยท Page 1 of 1 (latest)

half lichen
#

Good morning. Please help with my dusk to dawn outside light automation. I had it working using the 'Sun next setting' and 'Sun next rising' entities as triggers. However, there were occasions where it was too dark outside with these set, so I wanted more granular control.

I am now attempting to use the height of the sun as trigger. Please see my YAML below and what I am making a mistake on. Thank you for helping me, as I am new

pallid bobcat
#

Is it throwing an error, or not running at the right time or what?

half lichen
#

noticed this AM the lights didn't turn off when i expected them to. then i manually triggered the automation by hitting run. here is the trace:

#

am i doing something wrong with the 'above' and/or 'below'? or something wrong with the integers i am entering. i want it to turn the lights on when below the horizon 3 degreees, and turn off the lights in morning when it crosses above 2 degrees below the horizon

pallid bobcat
#

Manual triggering ignore the triggers which is why it chose no action

#

What's the trace from this morning?

half lichen
#

i did notice when i changed the automation, that i initally forgot to enter the trigger ID of "Dawn" so maybe that was the problem w/ the automation this AM. however, since the automation is now running, shouldn't it see the state of the sun elevation, and have the lights off? something is wrong w/ the way my trigger is currently set?

pallid bobcat
#

Ah, yes. If it didn't have the trigger Id that makes sense why it didn't do anything when it triggered this morning

half lichen
#

but now that i have the trigger ID entered, shouldn't it see that now? do i have any recourse other than waiting all the way to what i have defined as dusk, to see if it works?

pallid bobcat
#

The reason why it hasn't done anything since you modified it is because the numeric state trigger only goes off when it goes from below to above or vice versa.

#

You could have a button trigger it and then give it an Id of dawn/dusk for testing purposes

half lichen
#

i see. so the trigger only gets activated as the crossing occurs, and not the fact that currently the sun position is above -2 ?

wild forum
#

You can also manually set the state of the sun elevation in Developer Tools > States and see if it runs.

wild forum
#

Yes, numeric_state only triggers when the boundary is crossed.

half lichen
#

ok, so is there a way to simulate the crossing of over from below -2 to a number greater than -2 in Developer Tools?

#

otherwise, will just turn lights off manually and wait until this evening

wild forum
#

Yup. Set it to -2 and then set it again to -1 (or 2 or 12 or whatever lol)

pallid bobcat
#

Yeah, you can force the state as @wild forum mentioned

wild forum
#

Actually... set it to -3 THEN -1 or something

pallid bobcat
#

It updates every few minutes anyway

half lichen
#

so if i go into developer tools, what is the way to do it? set it to -2.5 and then wait for it to update?

pallid bobcat
#

Or set it to - 2.5 then 10

#

So long as it's either side of that trigger limit, it will trigger

wild forum
#

You don't have to wait at all... Set it once to -2.5, then turn around and set it to 10.

half lichen
#

ok, let me do. BRB

#

that worked lol. lights are off ๐Ÿ‘

wild forum
#

Woot

half lichen
#

thank u, bros. this is now resolved. u guys are the bomb

#

how do i mark Resolved ?

pallid bobcat
#

Np

wild forum
#

It was like 99.5% @pallid bobcat lol

half lichen
#

being a newb is frustrating lol

wild forum
#

Three dots menu > Edit Tags > Resolved

#

Eh, we were all newbs at some point.

#

Then you get old and wish you were still a newb. lmao

#

(HA old... not like old old) ๐Ÿ˜‰

pallid bobcat
half lichen
#

am old IRL and a newb at HA. we'll see how this goes lol

#

appreciate it. gotta run. will mark Resolved, and read more here on the Discord. doubtless i will be back w/ more questions ๐Ÿ‘

pallid bobcat
#

Take care, and feel free to ask more questions

half lichen
#

a lot to learn b4 i feel comfortable w/ this stuff. appreciate it ๐Ÿ’ฏ

rigid abyss
#

Why don't just use sunset/sunrise events with some offset, e.g. 20 minutes?

pallid bobcat