Closed goodlucknow closed 1 year ago
Thanks for the work on this integration! Having a curious issue as outlined above. The associated entities, and thus the displayed picture, seem to reset multiple times a day. Any ideas as to how I might better debug this issue?
Perhaps worth noting: when I try to configure the settings from the integrations page, album selection works fine, but the settings option seems like it's missing something from the description? The only option available is metadata. The update interval can of course be set through the provided entity but it reads like a similar option should display here?
Hmm, I've seen it happen once or twice as well. It looks like there is a moment where Home Assistant marks it as unavailable, but I can't really seem to figure out what's the trigger. I'll do some debugging to find it. Loading the device page requests an image to be shown as thumbnail for the image, that could trigger state updates, so my guess is that's the key to the issue.
For the last issue with the options, I'll change that, it's a left over from when the configuration was not per album but for the entire integration.
Thanks for the attention on it. It seems to happen quite regularly on my setup, every few hours. I wonder is there a connectivity issue my end but whatever the cause, is there any way for the entity states to persist after an unavailability event? Or perhaps an option to have it not poll for updates unless requested? It strikes me that (just in my use case), the integration should request the image at 4am and the image would remain locally until requested again?
It makes sense about the thumbnail triggering it - on that note I have noticed quite a lag between the thumbnail updating after an image update, while testing different configurations of how often wallpanel should check the entity for updates.
Forgive me if I'm talking nonsense, just thinking out loud about it...
Feel free to think along, it's always helpful to read how others interpret what you made!
Did some debugging over night, it probably has to do with Google's OAuth token expiring in combination with the way I'm currently handling adding new albums, so I'll need to make some changes there.
The integration already tries to reduce reloading data as much as possible, in general it will only update data if you actually request an image. So if the interval is one minute, but you don't have any dashboards opened nothing will happen right up to the moment you reopen a dashboard (or look at the device page, due to the thumbnail that is shown there).
Ah, and for the thumbnail not updating, I noticed that too, but that's a home assistant thing, it just doesn't do that. I guess it makes sense as it's normally used for camera feeds, and no one will probably look at the small thumbnail very long.
thanks @Daanoz for fixing this. Updated to the latest now and looking forward to trying it out.
My issue appears to be solved. Thanks so much. The only other query I'd have on it is that after a home assistant restart, that same photo is recalled, which makes me think the initial photo selection doesnt adhere to the "random" setting. But it's an easy workaround to call a new photo after a restart via automation so it's not a huge issue, and perhaps by design. Thanks again.
Yeah, that's default behavior, the first photo that it loads is actually whatever photo you have set as cover photo in Google Photos.
ah, thanks for clarifying that! I hadn't realised. That's perfect I can just set a new cover photo, as i've grown to resent the previous one during troubleshooting 😄
Version of the custom_component
V0.4.4
Configuration
configured through UI
Describe the bug
All sensors seem to become unavailable on occasion. Once they become available again, the current photo resets to the same one every time. Sometimes it seems like opeing the entity/device page in the frontend can trigger this. The debug logs do not seem to show any activity during the event,yet the device logs do as in screenshots attached. Use case: I'm using this intergration with wallpanel to have a screensaver photo that updates daily at 04:00 via a service call automation. This seems to work perfectly, but then at some stage during the day the displayed photo reverts to the original one. This hapened with the previous version as well as latest.
Debug log