HASSIO slider lamp input_number - help me [solved]

Hello

I have a question which I’m struggling with since a couple of days. I got Hassio and I want to add a slider for brightness of my lamp.

I know I have to add something to my configurations.yaml

input_number:
office_light_brightness:
initial: 100
min: 0
max: 100
step: 5

automation:
- alias: "Office Light Brightness"
  hide_entity: true
  trigger:
    platform: state
    entity_id: input_number.office_light_brightness
  action:
  - service: light.turn_on
    data_template:
      entity_id: light.office_light
      brightness: '{{ states.input_number.office_light_brightness.state | int * 2.55 | round(0) }}'

so if I copy this in my configurations.yaml it works but I have the problem that I also have an automations.yaml and it is in conflict with the “automation:” part. So, since I have no idea (just started) I know that I have to change something and put something into the automations.yaml. If I just copy the text above it will not work… can anyone help me? or provide a guide that can help me?

Thanks a lot for your help!

Remove the line automation: and put the rest of it in the automation.yaml

1 Like

Thank you, it worked now. I did exactly what you said before and it didnt work… but now it works… mysterious

I am trying to do exactly the same and the code mentioned in this thread makes perfect sense. What I do not understand is how I display the actual slider in the UI? Through a specific card? As an entity?

Thanks!