Automatic dimming - Set default brightness

Hello,

I am trying to create an automation to define de brightness of some lights depending on the hours of the day. I am using Home assistant 0.84.6 and the dimming is performed with a Fibaro Z-wave dimmer 2.

I do manage to set-up the brightness level when the light is turned on, but the issue is coming at 22:00 when passing from 100 to 13 brightness. The light is first turned on at 100 for about 1 second before being dimmed down to 13. Is their a solution to have the brightness level set up prior to the light turning on?

See bellow the piece of code.
Thanks in advance!

  • alias: ‘Set corridor brightness’
    trigger:
    • platform: state
      entity_id: light.fibaro_fgd212__corridor_light_dimmer_level
      to: ‘on’
      action:
    • service: light.turn_on
      data_template:
      entity_id: light.fibaro_fgd212__corridor_light_dimmer_level
      brightness: >
      {% if now().hour <7 %}
      13
      {% elif now().hour < 8 %}
      100
      {% elif now().hour < 20 %}
      255
      {% elif now().hour < 22 %}
      100
      {% else %}
      13
      {% endif %}
1 Like

I see it’s already an old question. Just wandering if you solved it. I’m trying to achieve exactly the same but hadn’t even come up with the basics yet. So thanks for that :wink:

1 Like