OpenEPaperLink / Home_Assistant_Integration

Home assistant Integration for the OpenEPaperLink project
Apache License 2.0
137 stars 32 forks source link

Implement TTL #30

Closed MuddyRock closed 9 months ago

MuddyRock commented 12 months ago

Describe the solution you'd like Implement TTL when image is posted to AP.

Additional context I have some tags which HA updates only once per day. Many others are set to update only once per hour. It would be useful if once the image has been updated, the tag could be set to not checkin again for a user defined time (e.g. 23 hours for the daily tags and 45 minutes for the hourly ones). This would save on radio and battery.

svenove commented 10 months ago

Adding "'ttl': "45"." here should solve it: https://github.com/jonasniesner/open_epaper_link_homeassistant/blob/main/custom_components/open_epaper_link/imagegen.py#L433

Of cource, hard coding a value for TTL isn't the best solution, so it should be implemented as a parameter that gets passed along.

jonasniesner commented 9 months ago

will be in the next release