123
(Taras)
May 1, 2021, 4:24pm
4
The following isn’t more compact but can be applied to any light:
Here is a script version of mrsnyds original work. Be advised this script is not identical to the original automation version. It uses the same algorithm but with several differences:
Uses light not entity_id
The option to specify the light(s) to be dimmed is named light instead of entity_id. The reason is because when you call a script using the script.turn_on service, you specify which script to turn on by setting the service’s entity_id option. This is the same name, so the script’s varia…
You can use the script in an action
like this:
action:
- service: script.light_fader
data:
light: light.lidl_e14_weiss
transition: '00:15:00'
It calculates the optimal dimming interval based on the specified duration length. All credit goes to community member mysnyds. All I did was refactor it.
1 Like