Hi
I have 2 dimmer outlets with dimmable halogenlights connected to them.
Now i want a better solution to simulate sunrise and sunset. Now i have 16 automation posts for each outlet
Turn on light 10%
2.torn on light 2 10%
And so on
This is something that takes a lot of time to administer since it is changing over time during the year.
Is there any easier way to solve this?
The timespann from 0% to max is about 3 hours, and the same in the other direction.
I am currently using a Nexa AD-147: Plug-in dimmer and a Shelly dimmer 2
The Shelly dimmer 2 is connected to a 12V halogen transformer and the Nexa is connected directly to 230V.
Your automation triggers at 09:00 and sets the lights to 10% brightness. You want it to progressively increase the brightness to 100% over the next 3 hours?
At what time do you want it to start decreasing the brightness to zero?
The challenge of helping you achieve your goal is the fact that you havenât clearly defined the requirements. âDepending on the time of the yearâ cannot be represented as automation logic until you clarify it. Similarly, âsomewhere between 60-100%â provides no guidance for how the value should be computed.
Sorry about that.
What would be most simple is if i hade one automation with values and then i can change them myself depending of the time of the year, since all depends of the outside temperature etc.
Thatâs another requirement that was unknown to anyone until now.
Itâs easy for me to create an automation that progressively increases, or decreases, a lightâs brightness over a period of time (using repeat). However, I feel no matter what I create it wonât suit your requirements for the simple reason that they havenât been fully explained yet.
Ok, sorry. Iâll try to explain.
I keep reptiles. I use this lights as hear source for them.
As i try to give them as natural environment as possible i hibernate them in the winter. But depending on the outside temps i decide if it is time to go all the way down to 5-8 degrees. In February-march i startup with a couple of hours of âsunâ and increase it until July when i start slowly decrease it again.
It would be easy if i just hade one automation for ramp-up and one for down.
As it is now i have to manually go into 32 automations to change the values
Thank you, now understand the purpose of the lighting and why brightness varies depending on the time of year.
Perhaps if we can reduce that to a single automation, then you can change the times in one place.
I assume half of the 32 automations is for turning on the lights and the other half is for turning them off? If thatâs the case, post at least four examples from each half so we can get an idea of when you sending the turn_on and turn_off commands.
Based on what you posted, brightness changes by 10% every 10 minutes, except in the first 20 minutes when it changes by 10% (i.e. at 9:20 and 15:20).
Is there a special need for this initial longer time period (20 instead of 10 minutes)? Can it be simplified so that all time periods are the same duration?
step_time represents the amount of time, in minutes, between each change of the lightâs brightness. It is currently set to 10 minutes. You can change it to whatever interval you prefer.
step_pct represents the percent change of the lightâs brightness for each step. It is currently set to 10 percent. You can change it to whatever amount you prefer.
The automation will trigger at 09:00(you can set it to whatever you want) and increases the lightâs brightness by 10 every 10 minutes. It will do this ten times (the number of iterations is computed by count).
The automation will trigger at 15:00 (you can set it to whatever you want) and decreases the lightâs brightness by 10 every 10 minutes. It will do this ten times (computed by count).
This automation uses a repeat containing a delay statement. If you restart Home Assistant, or Reload Automations, while the delay is waiting, it will terminate the automation. That means it will stop increasing/decreasing the lightâs brightness and the light will be left in its current state until the automation is triggered again. If that is unacceptable then the automation must avoid using a repeat with a delay.
Alternatives:
Single automation with multiple Time Triggers
Basically this is similar to what you have done, using 32 automations, except all times are in one automation. Its action will be complex because it has to determine what to do based on the triggered time. It is simplified slightly by creating two separate automations, one for increasing brightness and the other for decreasing it.
Single automation with a Time Pattern Trigger
Instead of specifying multiple Time Triggers, this one simply triggers every 10 minutes. Once again, the action will be complex because it has to determine what to do based on the triggered time.
Thanks mate!
Realy appreciate your work!
I tried to implement it with a blank blueprint, but i get error " Message malformed: Integration ââ not found"
When i tried to copy/paste to automations.yaml i get several error messages,
After alot of head scratch i have come this far: