Hello.
I’ve realized that two of my automation’s crash a bit with each other and I have to sort of combine them like a IF ELSE condition. I’m not particularly good of a programmer and am learning HA and YAML by reading documents and the forums here but can’t quite figure this one out. I need some assistance on how to think to improve my automation’s.
Currently my automation’s look as above. The first one (sunset_if_home) is my automation to turn on the lights when I arrive/am home and the sun is below 5 degrees above the horizon. And between some random times so that it doesn’t activate 5 in the morning when I’m sleeping. The second automation (evening_light) is that my lights should dim when I’m home and the sun is 10 degrees below the horizon because bright lights is a bit rough on my eyes then.
The problem I have is that if I’m out for long enough that the sun goes below 10 degrees under the horizon my lights won’t turn on when I arrive home. So I’d like to do an automation that starts my “normalvit” scene that is a normal white light when the sun is below 5 degrees (and above 10) but if I arrive home when the sun is below 10 degrees I’d like the automation to start the “dimmad_vit” scene instead with a dim white light.
I still want to keep the second automation to automatically dim the lights below 10 degrees, as it’s working well as long as I get home in time.
Anyone got any suggestions on how I could adjust my automations to meet my needs or got any tips for documentation I could read to perhaps figure it out on my own? Thanks a bunch!