Reset input_number
mstassenp opened this issue · 7 comments
Good morning,
Do you have a solution for my little problem.
I use several numberbox-card and I reset the different input_number with a script.
The values are indeed reset to 0 but the display in the numberbox-card does not reset to 0.
On the other hand if I use the + or the minus, then the display becomes correct.
Thanks for reading.
Michael.
I have just tried using input_number.set_value service from developer tools and it works fine.
Can you show me a minimal test code/script that I can reproduce the behaviour?
Bonjour,
In lovelace :
entities:
- entity: sensor.cnc_point_xa
name: Xa
- entity: sensor.cncxa
name: Xa corrigé
- type: custom:numberbox-card
border: true
entity: input_number.inxa
name: Corr.
state_color: true
In configuration.yaml
- platform: template
sensors:
cncxa:
friendly_name: "axe Xa"
unit_of_measurement: 'mm'
value_template: "{{ states('input_number.inxa')|float + states('sensor.cnc_point_xa')|float }}"
In script
alias: cnc_reset
sequence:
- service: input_number.set_value
data:
value: 0
target:
entity_id: input_number.inxa
Resetting "input_number.inxa" works fine. "input_number" is indeed reset to 0. But in the numberbox-card the display does not reset to 0
@mstassenp
I suggest you to use a proper formatting for the posted code (use triple "`") - otherwise not possible to be sure that the posted code is correct.
My test, no issues:
service: input_number.set_value
data:
value: 10
target:
entity_id: input_number.test_number
type: entities
entities:
- entity: input_number.test_number
- type: custom:numberbox-card
border: true
entity: input_number.test_number
name: Corr.
state_color: true
- platform: template
Also, this sensor seems to be not related to the issue.
if you reset to any other value for eg. value: 2
does it update the display correctly?
Sorry, it's the same problem.
The value is good but the display of the value in the numbox-card does not change.
Good morning.
I just updated and now it works great.
Thank you.