Chouffy / home_assistant_tgtg

TooGoodToGo items stock as sensor in Home Assistant
MIT License
65 stars 18 forks source link

Implement update(self) as a service to trigger manual updates #34

Open ademasi opened 2 years ago

ademasi commented 2 years ago

Hi,

Thank you for this integration.

I am trying to find a way to manually trigger the checks. Does this integration provide this type of service/event? With time, I came to know the best time to get an item. I would like to optimize the intervals of check for specific store.

Regards, AD.

Chouffy commented 2 years ago

Hey @ademasi, thanks for your message! What you want is definitely possible, however I lack the time to do it now 😢 If somebody implement it, I would be more than happy to merge it! You can find some details here: https://github.com/Chouffy/home_assistant_tgtg/discussions/15#discussioncomment-3037944

tjorim commented 1 year ago

Not sure if this function works, but there is a service named update_entity. You can call this in an automation to manually update it at your own custom schedule. Please check and let me know if it does what it should. (otherwise we will make this work in the v6 release for which mricharz did a rewrite)

blowk commented 3 months ago

Not sure if this function works, but there is a service named update_entity. You can call this in an automation to manually update it at your own custom schedule. Please check and let me know if it does what it should. (otherwise we will make this work in the v6 release for which mricharz did a rewrite)

Does is work with 'update_entity' so you can manually update one tgtg sensor? I don't see any update.