kevdliu / hacs-anylist

Home Assistant integration for Anylist
GNU General Public License v3.0
22 stars 2 forks source link

Create sensor with list contents #7

Closed dinki closed 8 months ago

dinki commented 8 months ago

First I want to thank you for your work on this project. We've been using Anylist for a long while now and really like it. I've wanted to integrate it with HA for a long time and now that's happened courtesy of your work.

I'm working on a project that will hopefully replace my Echo Show devices and Echo Dots. I am curious if you could tell me how I could create a sensor type device that would contain the Anylist data as an attribute list that would update any time items are added or deleted from the list? I am really wanting to display this information on a lovelace card that will update with the different actions. Is this possible?

kevdliu commented 8 months ago

I just released 1.4.1 which adds checked_items and unchecked_items to todo entity attributes. You should be able to create a template sensor based off of those attributes.

dinki commented 8 months ago

Sorry I took so long to get back to you. This is working fantastically and I appreciate you putting this in place.

I do have a question about general usage. I saw that you put something about leaving checked items for future items to be categorized correctly. I think I have something like 2000 checked items and now this is presented as a lot of data in the sensor. Should I really be keeping all of these?

kevdliu commented 8 months ago

You don't have to leave checked items for auto-categorization to work. It pulls from the "recent items" list which is separate. Even if you delete a checked item, it'll still remain on the recent items list.

dinki commented 8 months ago

Excellent. I will get them out of my checked items then. I'll dig around in the app to see if I can set that to auto remove too.

Closing ticket and thanks again for your work on this project!