#Smooth matter dimming

1 messages · Page 1 of 1 (latest)

buoyant ember
#

Hi,

I am trying to dim a matter bulb with a matter light switch, both connected to HA.

The problem is, the dimming is really jumpy and I cannot seem to fix it. I am trying to make it so that when I hold down a button, the brightness increases. I cannot seem to make it smooth without making it take ages to increase the brightness, the only way it looks smooth is if it takes 30 seconds to increase.

Does anyone know how I may be able to fix this?

Thanks in advance.

rare robin
#

How does your current automation work?

#

Also, how does the button report in HA - is it a switch that just goes on when you press it, or is it a button with an event_type: held or something?

native heron
#

I use a similar automation and I make 5% increases while holding the button. Zigbee in my case but I don't think that matters 🤷‍♂️

rare robin
#

yeah - if you're relying on the switch to output "button is being pressed, still being pressed, still being pressed etc" i could see it being jerky, but "trigger when switch is pressed, loop until it stops being pressed" is a much more robust way of doing it

buoyant ember
#

I was using the Turn On: Light function and changing different brightness steps and transitions to try and make it fast but smooth but I can never get both.

buoyant ember
rare robin
buoyant ember
#
  - variables:
      trigger_id: "{{ trigger.id }}"
      press_type: "{{ trigger.to_state.attributes.event_type }}"
      button1_max_iterations: 100
      button2_max_iterations: 100
  - parallel:
      - repeat:
          while:
            - condition: template
              value_template: >
                {{ press_type == 'long_press' and trigger_id == 'button1' and
                states(trigger.entity_id) == trigger.to_state.state }}
            - condition: template
              value_template: |
                {{ repeat.index|default(0) <= button1_max_iterations }}
          sequence:
            - sequence:
                - action: light.turn_on
                  metadata: {}
                  target:
                    entity_id: light.bedroom_lights
                  data:
                    brightness_step_pct: 7
                    transition: 0.1```
buoyant ember
rare robin
#

is there a wait in there as well?

buoyant ember
rare robin
#

i mean did you copy everything over, or just selectively copy a bit of it?

buoyant ember
rare robin
#

ok, can you copy the whole thing then?

buoyant ember
rare robin
#

the conditions are weird - you can add not_to/not_from filters to the triggers to ignore unknown/unavailable, and {{ trigger.from_state.state != trigger.to_state.state }} should always be true for a state trigger...

#

it all looks sensible otherwise. i guess the only thing might be a limitation on the bulb? what happens if you set it to like 10% and then send an action from the developer tools tab to go to 90% over 5s?
it might be that a 0.1s transition is too small for the fw on the bulbs