Reuse android_id
See original GitHub issueVersion of the custom_component
Latest master
branch
Describe the bug
When performing google requests to fetch tokens we should provide one and the same android_id, without generating a new id every time. If we do - it will look like dozens of different devices are connected to the same account that might lead to unexpected authentication problems.
We already have some mitigation in the underlying glocaltokens
python package, but we need a more robust mechanism, because now when Homeassistant restarts it will also restart glocaltokens
instance wiping away stored android_id
that will lead to fetching a new one.
We are already saving android_id
in the integration config flow (CONF_ANDROID_ID: await client.get_android_id()
), but we never use it. We should either introduce set_android_id()
method in underlying glocaltokens
that we would call every sensor update cycle (just to be sure) or pass that value when calling get_google_devices
.
@ArnyminerZ, would you have any interest in picking it? 🙏 🥇 😄
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top GitHub Comments
That’s an awesome attitude, @DurgNomis-drol! 🚀
No problem 😄 I learn a lot from these things, so i didn’t waste any time