Open jschlyter opened 5 days ago
maybe missing the init of the device? https://github.com/pypolestar/polestar_api/pull/173/files#diff-7572677b071e2c074082f7d9f0f8e2d8c98f561f6105760b266781ee8037ec44L53
The device init is called earlier in https://github.com/pypolestar/polestar_api/blob/main/custom_components/polestar_api/__init__.py#L49 ?
Do need to update the device before checking the URL?https://github.com/pypolestar/polestar_api/blob/main/custom_components/polestar_api/image.py#L99
It works sometimes so I guess this is a timing issue.
async_load_image is never used. On the other hand, we're not forcing update of the device so we might end up with a device not update the first time the image url is requested.
After starting hass, the image element does not load correctly. Reloading the integration fixes this, but I cannot see why.
One option would be to expose the URL of the car as a plain sensor as well.