Hello - I need some help with template code. I want to set a timer based on sunrise. I have an automation that triggers some lighting based on a motion sensor. Within that automation, I use a timer to specify exactly how long to keep the lights on. My time calculations aren’t working and that’s where I need some help. Below is what I want to start with:
IF current time is within 90 minutes of sunrise
set the timer to 120 minutes
else
set the timer to 40 minutes
Can someone help get me started?
//Brew