I would want to use slider to dimmer the light, so the following are my config…
configuration.yaml:
input_number:
lamp_bright:
name: Dimmer
icon: mdi:lightbulb
initial: 0
min: 0
max: 255
step: 10
automations.yaml:
- id: hue_soggiorno_slider
alias: hue_soggiorno_slider
trigger:
- platform: state
entity_id: input_slider.lamp_bright
action:
- service: light.turn_on
data_template:
entity_id: light.soggiorno
data:
brightness: >-
{{ states.input_number.lamp_bright.state | int }}
If I put {{ states.input_number.lamp_bright.state | int }} in the template dev tools I see the right value, but it seems that the event isn’t fired… why?