I’m trying to have a transition effect on a Sonoff D1.
But since the transition does not work I try to make my own using an automation.
alias: Taklampan på morgonen
description: ''
trigger:
- platform: state
entity_id: light.taklampa
to: 'on'
from: 'off'
condition: []
action:
- service: light.turn_on
data:
brightness: 1
entity_id: light.taklampa
- delay: '2'
- repeat:
until:
- condition: template
value_template: '{{states.light.taklampa.attributes.brightness == 255}}'
sequence:
- service: light.turn_on
data:
brightness_step_pct: 1
entity_id: light.taklampa
- delay: '2'
mode: single
The thought is to dim slowly on the morning, but that condition is removed for debugging purpose.
What happens is that it sets the value to 1, then goes to 3 then 255.
Anyone that can see the problem?