Anrolosia/Shopping-List-with-Grocy

Product names

Closed this issue · 5 comments

Hi

I run a script on my Grocy install that adds missing products and expired/out of date products to separate groups. This is particularly useful for the expired products since otherwise if you have a mix of in-date and out-of-date products you can't tell how many are still good and how many need to be thrown away

Anyway, to differentiate the products I add either one or two trailing spaces to the product name when they are created for the "Out of Date" and "Out of Stock" groups. However, Shopping List with Grocy (or MQTT, don't know which!) removes any trailing spaces from the names which means that there is only one sensor created :( I have tried changing the trailing spaces to a punctuation mark, eg "." and "!", but the same thing still happens.

Can Shopping List be made to respect the product names exactly as Grocy gives them?

Thanks :)

Hey @rachaelbond ! I'll see what I can do :)

@Anrolosia you are one seriously helpful and awesome dude!

@rachaelbond I just pushed an update on main branch, you can test if you want. I'll wait for your other modifications to do a release. Thanks

Cool! I'll look at it tomorrow :) Sorry my original patch was so hacky, but I couldn't quite follow through the logic of what was happening. Will update the Spanish translation tomorrow morning, as well (Stupid mistake on my part, sorry!) then if that PR gets committed I can include the file in the PR for the selectable image size

Sorted! Fab :) Thanks