ljmerza / ha-our-groceries

Our Groceries Integration for Home Assistant
MIT License
38 stars 8 forks source link

Expanded View in Home Assistant? #11

Open mboarman opened 4 years ago

mboarman commented 4 years ago

Can this be setup with a flag to always show in expanded view in home assistant? I would like to be able to keep in on a wall mounted panel in the kitchen and quickly see if an item is on the list without having to expand the card each time?

If not any suggestions on where/how I might edit the script to accomplish this?

Thanks in advance! I

AsWaM commented 4 years ago

Hello @mboarman Do you manage to acces the content of the shopping lists? If yes how, with which card?

mboarman commented 4 years ago

@AsWaM Yes, I use the integration along with the lovelace card. I would just like an option for the card to show the expanded list instead of having to click on the list each time to view the contents. Thanks for the consideration!!

ljmerza commented 4 years ago

The issue with this is, you don't get the details of a list unless you ask for it. So for this to work you'd have to request the IDs of the lists, then request the list details for each list...everytime. Considering the python module is an unofficial API, I'm hesitant to abuse the 'API' from ourgroceries and they come down on the python library.

That being said, this could be possible by adding some caching so we don't hammer the API but then data won't be live as it is now. There's some trade offs but I think a small TTL cache to help with hammering the API would be the way to go. It's a lot of work that I couldn't put in right now for this card but I'll leave this open if anyone wants it bad enough to do it themselves.

d-edge82 commented 3 years ago

@AsWaM Yes, I use the integration along with the lovelace card. I would just like an option for the card to show the expanded list instead of having to click on the list each time to view the contents. Thanks for the consideration!!

which card is it please?