Number control updating in the backend during typing instead of waiting until finished

Number entity is updating without waiting for the user to finish inputting data. I think this is an incorrect behaviour. No one expects to start typing and as they type mqtt messages are fired off after every single digit.

This makes the control unusable for any input where one needs careful control of numeric value.

For example lets say you have something like 53.9 in there and you want to change the controlled device to 53.6. If you go to that control and hit backspace it will immediately send an update to the device to set it to 53, then once you type 53.6 it will sent 53.6. This problem could be completely avoided if it could update on pressing enter or navigating away.

Using a slider option is not better because then one is forced to send 53.7 and 53.8 before finally 53.9. The only workaround I found that still has MQTT autodiscovery work with it (so no automation) is to configure select with every possible value instead of a number entity. But that is really inconvenient in a large range

Workaround:
For any automations triggered by some number change: replace a trigger by some input_button and place this button nearby a number box.

Can’t use automations… It has to be fully setup using MQTT qutodiscovery and automations I believe cannot be setup with autodiscovery messages.

This behavior exists in the Text input entities as well. There is a custom card that can be used with a helper…

This really should be default behaviour (updating after an enter is pressed, navigation away or a click anywhere else). Just like your standard onChange event for a text input. I have no idea why this would be chosen as a default instead.

Using a custom card is even less of an option than automation when you want a device to use MQTT autodiscovery only to add itself/remove from HA.

Can anyone point me towards the code that implements this behaviour now, please?

Actually I started debugging it and it seems to work correctly… Sending the update when I navigate away. I’m not sure if this was the case only in older versions of HA, but the latest appears to be working fine for me.

So no need to change anything.