Anrolosia / Shopping-List-with-Grocy

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

Product names #11

Closed rachaelbond closed 1 year ago

rachaelbond commented 1 year ago

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 :)

Anrolosia commented 1 year ago

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

rachaelbond commented 1 year ago

@Anrolosia you are one seriously helpful and awesome dude!

Anrolosia commented 1 year ago

@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

rachaelbond commented 1 year ago

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

rachaelbond commented 1 year ago

Sorted! Fab :) Thanks