fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
550 stars 102 forks source link

Invalid default config #308

Closed xannor closed 2 years ago

xannor commented 2 years ago

The addition (15 days ago) of a default thumbnail path const (https://github.com/fwestenberg/reolink_dev/commit/8e037e095235241c28ba6531b9ea3c132c7d3633#diff-5bc8f218f4f61a4f09becb44fc8ba32abcb5072bc2621af61764a7ae29128451R34) is invalid to the way I wrote the code. There should be no default path so the code can "guess" the storage folder. The config entries intent is so a person can specify the path they want thumbnails to be stored/fetched from, so the default must be blank otherwise it will always require someone to specify a path, and never use the one built into HA. I had to write it this way because there is no way to detect writable folders, so you either use what HA provides, or a person must specify the path, and ensure themselves, that it is correct.

Please change this default back to "", or remove it all together as it broke all my automations that created thumbnails of videos.

I apologize that I did not make this more clear in the original code.

edit: in the meantime I worked around it by manually fixing the line with an empty string, so it is not an emergency, just would like the correction in the next merge/push.

cpainchaud commented 2 years ago

@fwestenberg can you please comment on the reason why you introduced a default value ?