Input_number: isn't communicating with my fibaro dimmer 2

Hello all,

I have an issue with a slider I would like to add to the homescreen of my hass. It is not communicating with my Fibaro dimmer 2.

Here is my configuration:

configuration.yaml

input_number:
  kitchenlight_brightness:
    initial: 100
    min: 0
    max: 100
    step: 5
    mode: box

automations.yaml

- alias: "Kitchenlight brightness"
  hide_entity: true
  trigger:
    platform: state
    entity_id: input_number.kitchenlight_brightness
  action:
  - service: light.turn_on
    data_template:
      entity_id: light.fibaro_system_fgd212_dimmer_2_level
      brightness: '{{ states.input_number.kitchenlight_brightness.state | int * 2.55 | round(0) }}'

In groups I added

-   input_number.kitchenlight_brightness

This returns into:
image

But as you can see moving the slider isn’t resulting in the light dim to 0
image

So it is working but it is not following the slider, meaning turning on the switch the state for example is on (brightness=100%) the slider can still be in the left position (brightness=0%)

I hope you can help me,

André

Please edit your post and mark your YAML as code - as explained in the big blue box at the top of every forum page.

Is this the right way to do it?

1 Like

I don’t think you can turn on a light with brightness set to 0, that would be turning it off and you can’t turn off a light with a brightness attribute. I also can’t see any code to set the brightness slider from the state of the light brightness.

It is partly working now, I changed it into:

      brightness: '{{ states.input_number.kitchenlight_brightness.state }}'

And now it is responding to the slider, moving the slider to the right is turning on the button and increases the brightness. However when the light is turned off with the button the slider doesn’t move all the way left. Do you have any idea, I don’t have a lot of Python experience?

Thnx in advance,

André

When you turn off the light there is no brightness component so you would have to change the slider yourself. Use an automation to trigger on the state change of the light to off and action to set the input_number to 0.