robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
304 stars 60 forks source link

[FR] Use device_class: timestamp on sensors appropriate for this #554

Closed SVH-Powel closed 5 months ago

SVH-Powel commented 5 months ago

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

It would be nice if all datetimes delivered from this integration has a format like the now().isoformat() returns and that the sensor has a device_class set to timestamp. If that is done, HA is able to recognize datetimes as proper datetimes instead of strings and we can format the datetime to our own locale as set in the HA settings for that user.

One example is the new last connected, last data refreshed and parking time sensors which does not have device_class: timestamp and is not in ISO format. They show up in the UI as strings and not in the date format I have for everything else in HA.

Describe alternatives you've considered

Additional context

stickpin commented 5 months ago

@SVH-Powel Good idea, i will change it in the next beta release.

stickpin commented 5 months ago

Already implemented, will come in the next beta: https://github.com/robinostlund/volkswagencarnet/pull/247

stickpin commented 5 months ago

The feature is implemented in the v4.5.2-beta3