Closed Seba-VT closed 2 years ago
Why would you need a sensor ? We just refactored that cause a sensor does not make sense for a number. You not only have a slider but also access to the number. Unfortunately it's a float but that's cosmetic. You could add a separate entity to display a int if you really need.
Thanks for the quick replay @Lyr3x.
The issue that I have with the slider is that cover the number in lovelace when using it on my wall dashboard.
You could add a separate entity to display a int if you really need.
How I can do that? I tried as I posted above but I get errors.
You have two options:
- platform: template
name: "Template Sensor"
lambda: |-
return (int)id(peopleCounter).state;
You have two options:
- https://github.com/thomasloven/lovelace-slider-entity-row
- Create a template sensor:
- platform: template name: "Template Sensor" lambda: |- return (int)id(peopleCounter).state;
Thanks! I used the option 2 and now is correcly displayed. But now I have another issue, it takes several seconds to update the value to the template sensor, do you know why and how I can make it update in real time?
You coul add a on_value then update to the number sensor with something like. Don't have the exact syntax ready right now, but you can look it up for sure 👍 Otherwise, it's updated with its update interval.
I added update_interval: 100ms
and now is working perfect!
Thank You for your help!
Is your feature request related to a problem? Please describe. Currently, the output as a
number
displays the sliding bar when using it on lovelace.Describe the solution you'd like I would like to have the result of the counting as a
sensor
in order to display its value without the sliding bar on lovelace.Describe alternatives you've considered Tried to create a new sensor that capture the value of the output but its format is not compatible.
I get an error during compilation saying that it can't convert from
PersistedNumber
tofloat