#Sun elevation
1 messages · Page 1 of 1 (latest)
The time can never be both before sunrise and after sunset, are you using that to prevent the automation from running?
I have this in all the automations and the automations work
Hi @vivid narwhal,
https://dpaste.org/czBUW
That might confuse you, but it is what you asked for.
The basic trigger format to use is there, though...
( availability_template.jinja is in HACS)
Before sunrise / after sunset is a valid (and documented) setting.
If you want to use sun elevation instead of time, you just need a numeric state trigger/condition, using the elevation attribute of sun.sun. Is that what you're asking for help with, what specifically about it?
ok so you don't use the sun elevation, I see some cloud coverage sensor
That's from a weather integration accuweather I think
sophisticated by clever, indeed dark clouds lead to low lighting conditions during the day
It works pretty well. I had a condition where one of the lights I had on for other reasons, and had to doink it to allow that.
The global variable is here: (the set_variable template event)
https://community.home-assistant.io/t/trigger-based-template-sensor-to-store-global-variables/735474
But you could use a helper as well.