I just started (trying to) use Input Sliders to change the brightness of some lights.
I’ve noticed when I changed the light’s brightness from somewhere else in HA (scene, script etc.) the slider doesn’t update to show the light’s current brightness.
Is there an easy way to do this?
Or if I turn on a scene or script that changes the brightness of the light could that scene/script ‘tell the input slider’ to update with the brightness that the scene/script is just set?
You can do the latter option, and set the input slider via the script.
I use input_selects for mine (I have a card with the light on, and an input select beneath for the scenes), and they reset to ‘select’ when the light is switched off.
I have other situations where input slider’s are updated. This is for my ‘alarm clock’ packages, where there is a separate alarm clock in three rooms which swittches the light on at the time selected on the input sliders. I then have a ‘master panel’ where I can set all 3 rooms at the same time.
Code for all of this is on my github. (link in my profile)
I’ve taken a look and seen ones where input_select is your trigger, but haven’t seen where something like a scene or script that when triggered changes an input_slider’s value.
Could you point me to where I should be looking in your files?
Now I’m just having trouble moving the slider when I run the script. The script’s supposed to turn on a scene that sets the landing light brightness to 100% (255), and move the slider to the far right.
The second version is what you want but you need to remove the ‘date_template’ and replace with ‘data’ as it’s not a template or you can leave data_template and use’ value: {{255|float}}’