Matching Smart Bulb Brightness from Dimmer Switch

I recently got a Zooz ZEN30 double switch which has a smart bulb mode that allows for the dimmer to provide 100% power, but still report a brightness.
It also appear Inovelli has a beta firmware that may support the same feature with their dimmers.

I’ve finally got an automation to trigger and change the brightness, but it only appears to trigger on the first brightness step when holding down the dimmer paddle. Any suggestions or ideas why it’s not triggering for each brightness step of the dimmer?

- id: '1595357676415'
  alias: Bedroom Dim
  description: ''
  trigger:
  - entity_id: light.bedroom_lights
    platform: state
  condition:
  - condition: template
    value_template: >
      {{ trigger.from_state is not none and
       trigger.from_state.state == 'on' and
       trigger.from_state.attributes.brightness > 0 and
       trigger.to_state is not none and
       trigger.to_state.state == 'on' }}
  action:
  - data_template:
      brightness: '{{ trigger.to_state.attributes.brightness }}'
      entity_id: light.bed_0
    service: light.turn_on
1 Like

I believe that’s because once you’ve switch the light on, its state doesn’t change anymore (it’s till on)
You would need to (also) trigger on the entity’s attribute change.
it would look something like:

  trigger:
    platform: template
    value_template: "{{ state_attr('light.bedroom_lights', 'brightness') }}"

Thanks, I’ll give that a try. I tried something similar at first, but couldn’t get it to trigger.
However, what I posted is triggering on a brightness change when the list is already on. It’s just only triggering on the first step.
I’m wondering if the .113 changes (just posted) around “single, restart, queued…” in automations might be the solution. It sounds like my issue is that the trigger is “Single” right now and I might need to set it up as “Queued”.

I just noticed you have trigger.from_state.state == 'on' and trigger.to_state.state both in your condition.
I would remove this, trigger on the attribute

So it’s working a little better with just the trigger you suggested, but it’s still only catching a few of the triggers. (it might only do the first 2 or 3 brightness steps and miss the last 4 or 5).
It also worked with my original trigger when I removed the state == ‘on’ conditions, but with the same results. I think keeping it simple with the single brightness trigger and the new queuing in .113 this will work. Now I just need to give up and update already :smiley:
Thank you for your help.

1 Like