Starting from 2021.4, I have this issue:
I see all my input_number as float in the frontend (ex: “3,0” instead of “3”).
I am aware that they are indeed float numbers but I don’t know where to put the cast of.
For example I have this input number :
clean_shelf:
name: "Clean Shelf"
max: 14
min: 0
step: 1
and this automation :
- id: 'CleanTheShelf
alias: add clean
initial_state: true
trigger:
platform: time
at: "8:30:00"
action:
- service: input_number.increment
entity_id: input_number.clean_shelf
then in my ui-lovelace.yaml
- input_number.clean_shelf
Where I am supposed to cast it to int ?
Thanks
1 Like
bouwew
(Bouwe)
April 11, 2021, 10:28am
2
When this is a change you don’t like, caused by a HA Core update, create an Issue here: Issues · home-assistant/core · GitHub
On second thought, this could be a HA Frontend-topic, in that case go here: Issues · home-assistant/frontend · GitHub
2 Likes
docsparks
(Docsparks)
April 11, 2021, 8:30pm
3
i have this exact issue and its causing my log to go nuts for using an input_numer casted to a timecode automation convering 5 (now shown as 5.0) to HH:MM:SS , and in my code as
- service: timer.start
data_template:
entity_id: timer.floatdown
duration: "00:{{ '%0.2d' % states('input_number.floatdowns')|int }}:00"
- delay: "00:{{ '%0.2d' % states('input_number.floatdowns')|int }}:00"
gives me errors about the decimal not being allowed
docsparks
(Docsparks)
April 11, 2021, 8:31pm
4
I also did not know where to post this issue when overlooking the catagories…
docsparks
(Docsparks)
April 11, 2021, 9:13pm
5
I believe this is on Github as:
https://github.com/home-assistant/frontend/issues/8770
not exactly sure, but hopeful.
bouwew
(Bouwe)
April 12, 2021, 6:18am
6
While digging a bit, I think the referenced PR #8811 is actually the reason now the number is shown as a float.
1 Like