rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.9k stars 556 forks source link

Yaml Configuration #1171

Closed justus-go closed 1 year ago

justus-go commented 1 year ago

Can you please bring back Yaml configuration. It would make the configuring of multiple divices so much easier. ;)

~justus

ThomasCr commented 1 year ago

+1 I also cant see any comfort in the GUI right now. It makes things more complicated. every time you need to change on DP, all DPs need to redefined.

It is also not possible to delete on device - because we only have:

apbarratt commented 1 year ago

I have to agree with this. The GUI is very rough around the edges and its flow makes mistakes exceptionally easy, especially with the requirement to do everything as one long chain. If I find some time, I'd very much like to lend some effort into improving the UI but in the mean time I have found myself editing the yaml directly on the /config/.storage/core.config_entries file to repair things, which is something that I would far rather avoid doing as it's such a dangerous area to be editing directly.

rospogrigio commented 1 year ago

Not going to happen, sorry. It is too painful to maintain codes both for YAML (which is being abandoned by almost all the Integrations) and config flow. We can try to improve the config flow if there are some problems but I'm not willing to restore YAML configuration. @ThomasCr : it is possible to delete a device: enter it under Devices -> 3 dots in the Device Info frame -> Delete.

1RandomDev commented 1 year ago

Did you guys find anyone that maintains an active fork which reimplements the YAML config again?

psychowood commented 1 year ago

Not going to happen, sorry. It is too painful to maintain codes both for YAML (which is being abandoned by almost all the Integrations) and config flow. We can try to improve the config flow if there are some problems but I'm not willing to restore YAML configuration. @ThomasCr : it is possible to delete a device: enter it under Devices -> 3 dots in the Device Info frame -> Delete.

What about allowing to copy/paste in a textarea something (yaml, json, whatever format you decide that does not require to maintain two different implementations) that could bypass the UI when configuring a device, just after inputing deviceid/key/ip ?

That would also make quite easy to share device templates between users, which imho is possibly the only real weak point of this great project.

rospogrigio commented 1 year ago

Well, that's a nice idea but again, then we'd need to maintan the code that parses that text but I'll think about it. Maybe something like exporting/importing directly the entities json from core.config_entries, so that the users can share it... I'll give it a thought, but not in the short period, sorry. Thank you for the suggestion though.