audiconnect / audi_connect_ha

Adds an audi connect integration to home assistant
MIT License
238 stars 97 forks source link

Last update is a string instead of a datetime. #299

Closed wigster closed 7 months ago

wigster commented 7 months ago

The sensor._last_update state is interpreted as a string instead of a datetime.

Possibly, it is just missing the 'device_class: timestamp' attribute.

As it is, the sensor does not get reformatted to e.g. relative time by the UI.

Kolbi commented 7 months ago

Can you check https://github.com/audiconnect/audi_connect_ha/pull/300 ?

wigster commented 7 months ago

It doesn't seem to solve the problem. In the entities card:

image

I still do not have the device_class in the attributes of the entity. I have checked that the dashboard.py contains your latest changes from #300

Kolbi commented 7 months ago

Ah I see. Need to dig deeper into it.

Kolbi commented 7 months ago

Try again https://github.com/audiconnect/audi_connect_ha/pull/300 working for me now.

wigster commented 7 months ago

Yep can confirm it works in your branch

Kolbi commented 7 months ago

I close this case, as I guess the https://github.com/audiconnect/audi_connect_ha/pull/300 will be merged today or tomorrow @cdnninja