frontend
frontend copied to clipboard
SQL error clears form
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.
Describe the issue you are experiencing
When adding SQL integration, filling in the form and press SUBMIT. When a problem occurs (e.g. SQL is invalid) the whole form is cleared and all fields must again be filled in. This is annoying.
Describe the behavior you expected
I'd expect all fields to be filled in as they were, so content can be modified to fix the problems.
Steps to reproduce the issue
- Add SQL integration
- Fill in all fields but make a mistake in the SQL
- SUBMIT ... An (rather unhelpful) error message is given and all fom fields are cleared.
What version of Home Assistant Core has the issue?
2022.6.2
What was the last working version of Home Assistant Core?
unknown
In which browser are you experiencing the issue with?
Firefox 100 Chromium Version 101.0.4951.64 (Official Build) (64-bit)
Which operating system are you using to run this browser?
Fedora 35
State of relevant entities
N/A
Problem-relevant frontend configuration
N/A
Javascript errors shown in your browser console/inspector
N/A
Additional information
On a related note: An SQL sensor defined in YAML is now imported into the UI:
Configuration of the SQL sensor platform in YAML is deprecated and will be removed in Home Assistant 2022.6; Your existing configuration has been imported into the UI automatically and can be safely removed from your configuration.yaml file
Integrations show a new device (SQL). However, when I click on configure I get a blank form. Where did my YAML configured SQL sensor go? Another restart and the SQL integration is also gone...
Note that the SQL is still considered invalid, hence the relation to this issue.
Just my 5cents to the SQL UI. Not possible provide just unit_of_measurement without providing template values in SQL integration. It's possible to create the sensor providing only database address and query (in my case MariaDB). The same issue happens when you try to edit query in SQL integration. I'm not using template, therefore I'm unable to set unit of measurement for the query result separately. Sorry posting here, was extremely hard to find how to report new issue for SQL integration.
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.