Danielhiversen / home_assistant_airthings_cloud

Airthings cloud
Apache License 2.0
32 stars 6 forks source link

Added tracking token expiration #16

Closed avocadosalsa closed 3 years ago

avocadosalsa commented 3 years ago

This is to address the issue with becoming unauthorized every ~3 hours as noted in #14. The line where the token, minus 60 seconds, is used to compare to the current time is rather arbitrary. I am simply trying to add a buffer value so that we do not end up in a situation where the token is about to expire. I am certainly open to better alternatives.

avocadosalsa commented 3 years ago

I am going to let this run for a while and make sure it really solved the problem.

Danielhiversen commented 3 years ago

Thanks, LGTM. Let me know when you are done testing

avocadosalsa commented 3 years ago

I left this run overnight and it appears to still be working.