audi_connect_ha icon indicating copy to clipboard operation
audi_connect_ha copied to clipboard

Log Debug output Timestamp PR252

Open Kolbi opened this issue 1 year ago • 5 comments

Bug introduced by PR: https://github.com/arjenvrh/audi_connect_ha/pull/252

The output in the log for Timestamp looks for example: 'carCapturedTimestamp': datetime.datetime(2024, 3, 5, 13, 35, 51, tzinfo=datetime.timezone.utc),

This cases issues if you try to verify the json with tools like https://jsonformatter.curiousconcept.com/

Kolbi avatar Mar 06 '24 07:03 Kolbi

I'm confused. This is just raw response from the api. If you disable debug this output with disappear from logs.

cdnninja avatar Mar 06 '24 14:03 cdnninja

@Kolbi I agree. The timestamp is not a valid Json item, but this is how the Audi servers send them.

t0bias-r avatar Mar 07 '24 08:03 t0bias-r

Funny. :) Normally Audi should fix this on their side,

I'm thinking if it would be helpful for us to convert timestamps before LOGGER.debug...

https://github.com/arjenvrh/audi_connect_ha/blob/8065ff79c462e7daead19338a12f54b08b45f430/custom_components/audiconnect/audi_services.py#L198

Kolbi avatar Mar 07 '24 09:03 Kolbi

I think its good to have the raw values at the debug level. It may be useful to have them at the info level in a more cleaned up data structure for easy reading.

Logs could use a lot more cleaning up/additions for better insight into whats happening though.

edit: learned the hard way info is not for custom component info lol

coreywillwhat avatar Apr 08 '24 23:04 coreywillwhat

Also, I couldn't agree more @Kolbi I'm losing my mind removing or quoting the datetime.datetime(xxx) data so i can see it in a readable format. A raw format debug, and a formatted debug, would be really nice.

coreywillwhat avatar Apr 16 '24 23:04 coreywillwhat

This issue is stale because it has been open for 45 days with no activity. Are you still experiencing this issue?

github-actions[bot] avatar Feb 11 '25 02:02 github-actions[bot]

This issue was closed because it has been inactive for 15 days since being marked as stale.

github-actions[bot] avatar Feb 26 '25 02:02 github-actions[bot]