Hello, I can’t for the life of me figure out how to get an input_slider to stay updated with the light itself.
The slide works perfect to control the lights, but if I were to shut the light off, it remains in it’s position.
Any ideas? This is what I have so far
input_slide.yaml:
kitchen_brightness_slider:
name: Kitchen Light Brightness
icon: mdi:lightbulb
min: 0
max: 254
step: 1
automation.yaml:
- alias: Kitchen Light - Adjust Brightness
trigger:
platform: state
entity_id: input_slider.kitchen_brightness_slider
action:
- service: light.turn_on
data_template:
entity_id: light.ge_12724_3way_dimmer_switch_level_5_0
brightness: '{{ trigger.to_state.state | int }}'
- alias: Set Kitchen Slider
trigger:
platform: state
entity_id: input_slider.kitchen_brightness_slider
action:
- service: input_slider.select_value
data_template:
entity_id: input_slider.kitchen_brightness_slider
value: '{{ states.light.ge_12724_3way_dimmer_switch_level_5_0.attributes.brightness }}'
The reason for this is to use the input slider since the toggle for a dimmer hides the brightness slider when it’s off, so in order to dim the light, you must turn the light on and then dim.
Thanks!