Input Number or Slider

you updated HA from before version 0.55 to after 0.55
and that has a breaking change.

because i am still on an older version from HA i still have input_slider in stead of input_number.
changing widget type does what it says. so with input_number you use a completely different widget. (which is default included in AD)
how to change the input_sliders i made?

  1. start reusing widget_type new_input_slider or vertical_input_slider like before.
  2. go to your custom_widgets directory and find the files new_input_slider.yaml and/or vertical_input_slider.yaml
  3. in those files find the line that says:
    service: input_slider/select_value

and change it to

    service: input_number/select_value

if i am correct thats all that needs to be done and from that moment on the sliders should work again.


about the sonos.
you cant set it to 1-100 with steps 10 unless you create a new widget that in the background recalculates the value to the needed value in hass.
so it is possible to show the steps differently, but you need to create a custom widget for it. you need to be able to change javascript and you need to understand creating your own custom widgets.

Ah, how did I know you might have a quick answer:) Thank you sir, that worked and my sliders are now back in action.

For the sonos…without creating a custom widget how can I get the slider to work?

When I move the slider, the volume does not change. If I move the slider in HA webpage it does change the volume instantly. Am I missing something?

basement_vol:
    widget_type: new_input_slider
    entity: input_number.sonos_basement_volume
    title: Basement Volume
    step: 0.1

livingroom_vol:
    widget_type: new_input_slider
    entity: input_number.sonos_living_room_volume
    title: Living Room Volume
    step: 0.1

bedroom_vol:
    widget_type: new_input_slider
    entity: input_number.sonos_bedroom_volume
    title: Bedroom Volume
    step: 0.1

if you made the mentioned changes, it should work like it did before.
step isnt needed in the widget description.

do you see any javascript erros in the console, or an error in you AD.log or in HA log?
in your dashboard does it show the right values? (min, max value)

I made the changes, in both new_input_slider.yaml and vertical_input_slider.yaml

Here is my new_input_slider.yaml - the one I am currently trying to use:
da@dash:/home/homeassistant/conf/custom_widgets$ cat new_input_slider.yaml
widget_type: baseslider_new
entity: {{entity}}
post_service:
service: input_number/select_value
entity_id: {{entity}}
fields:
title: {{title}}
title2: {{title2}}
SliderValue: “”
MinValue: “”
MaxValue: “”
sliderValue: “”
minValue: “”
maxValue: “”
StepValue: “”
icons: []
css: []
static_icons: []
static_css:
title_style: $new_input_slider_title_style
title2_style: $new_input_slider_title2_style
minvalue_style: $new_input_slider_minvalue_style
maxvalue_style: $new_input_slider_maxvalue_style
value_style: $new_input_slider_value_style
slider_style: $new_input_slider_slider_style
widget_style: $new_input_slider_widget_style
da@dash:/home/homeassistant/conf/custom_widgets$

I added the step before I asked you just in case, but I wasnt using that normally.

I have the terminal open where I would normally see errors scroll as I move around tabs, it shows nothing at all, whenever I see move the slider it either doesnt log it or doesnt recognize it it seems like.

Thanks again for the help here

Im not sure where to find the other two logs you asked about…

first try to use codeblock if you show code.
you can do that in general (also discord, github, etc) like this:

typ the sign ` (on querty keyboard left from 1) 3 times on an empty linebefore the code and after the code.
you could also select the code and use ctrl + shift + c or the button above your text which looks like < / >

javascript console can be found in your browser. in chrome that is with ctrl + shift + I or rightclick and chose inspect
Homeassistant log can be found in your hass config directory.
in appdaemon.yaml you can set 2 kind of logs, default they go to the screen, but you also can send them to a file. (i do send the error log to a file to make sure i dont miss them)

what version from hass are you using?

I just tried the java console and nothing in there either. Im on 59.1. Sounds like I may need to look at another way to do this. Do you know if there is plans to update this in the future? I love my dashboards. Thanks!

it must be working. and in the near future i will also go over to the latest HA, so i need it to work myself. :wink:
and andrew will implement this in a later version from AD, but then also it needs to work.

no error in java, so thats good.
you could try to restart everything, and delete the files in /conf/compiled/js and conf/compiled/css (leave the dirs there.)
also clear your browser cash.

it might be some left over from your previous settings.

Yea its still not working. Even when I push other buttons that do work I get nothing in the javaconsole

i think i know the problem.

the service seems to have changed.

the line i had you change to

  service: input_number/select_value

are wrong i guess (i did look at the input_number widget)
it should be

  service: input_number/set_value

so you need to change those 2 yaml files again and then it should work.

My man. I just got a chance to make that change. (stupid work always getting in the way of my homeassistant fun). Working like a champ again, thank you once again!!

1 Like

Hi

sorry for hijacking this post but I think I have a similar problem.
I’m running HA 0.59, AD 2.1.12 for HADashboard

When I try to use an input_slider as widget_type I get a

Unable to find widget_type 'input_slider'

If i use input_number instead, I get a

**500 Internal Server Error**
Server got itself in trouble

So I tried to apply this post hint but I am unable to find this location:

/home/homeassistant/conf/custom_widgets

I may have missed something during HAdashboard installation.
Also, my input_number in HA is working fine, as expected.

Any idea ?
Thanx

in HA 0.59 its input_number.
the AD version that goes with that alsooouses input_number so obviously input_slider is gone.

the custom_widgets dir is not created at default. so you need to create that when you want to use custom widgets.

you get a server got itselve in error what suggest you have another problem.
so please post the dashboard here so we can see whats wrong.

1 Like

You solved my issue :ok_man:
I had the line:

unit: "&deg;C"

instead of

units: "&deg;C"

which crashed the panel.
Now the input_number widget is working as expected.

Is there a way to get a vertical layout instead of only “+” and ‘-’ signs ? I mean the cosmetic arguments, mentionned in the doc like for example “vertical_up_style” are working ?
Thank you very much @ReneTode

your welcome.

at the moment sliders are only available as custom widgets.

OK great, I will give it a try
Thanx :grinning:

Regarding using an input_slider to control the Sonos volume, did you make an automation to link the two, or can it control an attribute directly?

I got this working perfectly after @rene help. I have a sensor and automation that keeps the volume in sync. So no matter how I change the volume the dashboard is accurate and when I change it from there it’s instant. I also have scripts and buttons that join rooms or unjoin rooms. Then scripts for some of my most played favorites. I’d be happy to share. I’ll be home an a few hours and post if you’d like?

2 Likes

Forgot I had vpn setup. Here is an example:

1 Like

only thing i cant figure out is the pause skip back.

ive tried all the ones from media player but they dont seem to work