esphome-components
esphome-components copied to clipboard
Sanitize data from Home Assistant
These changes sanitize the data being exported from Home Assistant to the esp32. There is still a need to sanitize the data on the esp32 side as well, but these changes will fix the import data issues.
Thanks for PR! I my case it's was possible to add few devices at once, just specify few MACs in a row. Here validation will allow to specify only one device MAC, do you think it's will be better?
For the most part, I just allow my setup to discover devices. In the few cases where I found a need to add addresses, I added them one at a time. It would certainly be possible to come up with a list format as well, though that is not something I thought of. I just wanted bad data out of the system, and some validation on what was being passed in. The nice thing about validation as well is that for someone who is knew to this, they get an idea of what sort of value that the text box takes. FWIW I think that once the device has been added, I think the value should go back to being blank.