Inconveniences when using number entity in box mode
Checklist
- [X] I have updated to the latest available Home Assistant version.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
- [x] I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.
Describe the issue you are experiencing
Hello! There are some inconveniences that I have encountered when interacting with mqtt number in box mode. I opened the issue specifically regarding mqtt number, but I was told that it was all related to the usual behavior of the frontend... As for me, everything works as, apparently, it was originally intended by the developers. But the whole point is that the way it was conceived and implemented leads to some inconveniences in the situations that I have described:
- When you exit the cell (or press "enter"), the value, which was currently contained in the cell, is immediately sent to the device...
- If a value has already been entered in the cell, it cannot be re-sent to the device at once. In order to send this original value, two actions are required: first, change the value and send it, and then change the value again (return it to the original one) and send it to the device again. It is necessary to make a reservation here: unfortunately, my device does not send part of its settings in the mqtt message... The connection is partially one-way... That's why I don't use state_topic either...
Describe the behavior you expected
- I would like to be able to send values only forcibly (when pressing some specialized button, for example) - for example, only after I have made sure that the entered value is exactly what I need. Or, for example, to avoid accidents when the input of a value has not yet been completed, but an exit from the cell was accidentally carried out (the cat moved the mouse, for example).
- It seems to me that the introduction of a specialized button (the same one as for case 1) can also help here. Only when this button is clicked, the value that is currently set in the cell will be sent.
Steps to reproduce the issue
Thirst case:
- Start typing the value in the cell
- Randomly select another interface element (or accidentally press "enter") before you finish entering the desired value
- An incorrect (incomplete) value will be sent in an mqtt message to the device
Second case:
- The mqqt number cell already contains a value that was previously sent to the device.
- The device crashes - its settings are reset - but no changes occur in the cell (the previous sent value remains there), since state_topic is missing (due to the fact that the device does not send mqtt messages with its current settings)
- You somehow discover that the device settings have been reset and want to restore them by re-sending the value from the mqtt number cell (which is already installed there) to the device.
- You select this cell and press "enter" (or simply exit the cell by selecting any other interface element) - after that, the mqtt message with the value from the cell should be sent to the device - this should happen with standard behavior.
- However, nothing happens - the mqtt message is not sent!
- You change the value in the cell to another one (which we do not need) and press "enter" (or simply exit the cell by selecting any other interface element) - mqtt message with an incorrect value is sent to the device
- You change the value in the cell one more time to the original (which we need) and press "enter" (or simply exit the cell by selecting any other interface element) - mqtt message with correct value is sent to the device
- That is, to send the desired value, which is already contained in the cell, it is necessary to send the values twice: first the wrong one, and then the correct one again!
What version of Home Assistant Core has the issue?
core-2024.3.1
What was the last working version of Home Assistant Core?
This behavior is also observed in all previous versions
In which browser are you experiencing the issue with?
No response
Which operating system are you using to run this browser?
No response
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
As I said earlier, this cannot be called a mistake, but it creates inconveniences that I would like to fix.
I can't speak for other developers but personally I can't really see these kind of changes being made to number as it may be very disruptive to other usecases.
That said I think you could easily build this kind of setup for your own dashboard if you wanted. Just create a helper input_number, and put that on your dashboard with a button that when clicked calls set_value on your number with the value of the input_number. I think that would get you pretty close to what you want.
@karwosts, yes, of course, I could do everything exactly as you describe... But why do this if the desired element already exists, it just requires a little "setup"... And there is such a question: will I be able to do as you describe, but not on the dashboard, but on the device page, where all the sensors, binary sensors, meters, etc. that are available for this particular device are displayed? The mqtt number that this device has is also displayed there... Here, instead of mqtt number, can I add input number helper? Apparently, in other words, is there any way to assign an input number helper and a button helper to the device so that they are displayed (and can be used) in the specified interface element? I am not saying that it is necessary to redo the logic of using number... I'm saying that maybe for those mqtt number elements that, for example, do not have state_topic, it would be possible to optionally use a slightly different mode... That is, maybe it is possible to add a third optional mode, which I described above, to the box and slider modes... Is it impossible?
Do I understand correctly that there may be no reaction to my problem here at all, leaving me alone with it? )
Yes that is very possible.
@karwosts, I see))) Maybe then at least you can answer the questions I asked you?
No you cannot add new entities to a device page, that is not user customizable.
It is theoretically possible that someone could createa a new display mode other than box or slider.
@karwosts, thank you very much! Is "someone" one of the developers who developed these two existing modes? Could it be someone from the outside?
It does not have to be an original developer, anyone from the community is welcome to write the code and submit a pull request for new features. But it does need good justification and needs to be approved by the repository maintainers.
@karwosts, thank you very much for the explanations! Well, I hope that this will at least somehow interest someone...
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Hello! I regularly update to the latest versions of Home Assistant, but the inconveniences I described still exist... In this regard, please do not close this issue and do not mark it as stale... четверг, 20 июня 2024г., 18:02 +03:00 от github-actions[bot] @.*** :
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions. — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread. Message ID: @ github . com>
Unfortunately, the inconveniences I have described still exist... It is a pity that there are no competent people who can fix this yet...
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Unfortunately, the inconveniences I have described still exist... Apparently, there are no plans to change (improve) anything... In this regard, if necessary, you can close this issue...
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.