Hello,
Can you please help me how to create switch button with slider? Similar to light sensor as is defined in HA.
For better explain I include image how it should look like.
Actually I have switch which is operating as on/off for speakers. Also I defined number slider 0-100 of system volume, which is used with automation to set system volume. I would like have this two entities altogether. Is it possible control both entities even if switch will be off, it will be nice to set volume first and then turn on speakers.
Used entities:
entity: switch.socket_sound (on / off)
entity: input_number.volume_value (0 - 100)
What happens if you create a template light entity and change the icon to a speaker?
Do you get that result?
If so then I think you can use a template light to do the job
Than you for your reply, time ago I was looking at HACS, but I’m wondering with compatibility with HA after updates, so I’m trying to do not use it. Also I’m not sure how well it is working with HA installed on docker.
I tried it, that looks well, but I’m not sure what I’m doing wrong, slider is working from 1% to 100% which is acceptable, but if i go to lovelace first time it is showing 1% until I change it, something with level_template is wrong . Code what I’m trying:
That’s fine, just pointing out that there was something that might do what you want.
As to compatibility with HA, the primary dev of HACS is actually an employee of Nabu Casa, so they work full time on HA also, towards the comment of HA installed on docker, HAOS itself is just using the docker container version of HA.
I use HACS with HAOS and when I first started playing with HA, it was in a pure python virtual-env. It just works.
Finally, you don’t have to install HACS to make this work. The repository I linked to has instructions on how to install the custom card without HACS.
When the switch is off, level is showing 0, when switch is on, then level is showing correct volume value. Any idea how to force show level even if switch is off?