Anrolosia / Shopping-List-with-Grocy

A Shopping list integration with Grocy for Home Assistant
MIT License
41 stars 1 forks source link

Rachaelbond patch 2 #13

Closed rachaelbond closed 1 year ago

rachaelbond commented 1 year ago

Makes the product image size selectable in config_flow. 0 to disable and either 100, 200, or 400 px width

Anrolosia commented 1 year ago

It's a good idea to do that, thanks for the PR One thing tho, instead of setting the default value for everyone to 0, could you use the migrate entry function to set the old size (100) if the checkbox was checked? And of course you'll have to increase the config version

rachaelbond commented 1 year ago

Hi @Anrolosia I think this deals with the new config change in init.py correctly, but please double-check! I've not done a home-assistant config migration before. I've also changed the config variable name from "adding_images" -> "image_download_size" and removed "adding_images" in the migration. The other files have been updated to reflect the new config variable name.

rachaelbond commented 1 year ago

Silly mistake corrected. The default value of "image_download_size" when imported should be 0, not TRUE

rachaelbond commented 1 year ago

This has turned into a linting mess. Am closing this PR and opening a new one