Hello, nice integration, I use on my Home Assistant from some time now.
I've noticed that the last_synced attributes were not in my timezone.
I've made some coding myself to fix it, just for your information if you want to implement in the stable release:
In sensor.py import pytz, then in extra_state_attributes:
`
tz = get_localzone()
gmt_sync_timestamp = datetime.datetime.strptime(self.coordinator.data["lastSyncTimestampGMT"], "%Y-%m-%dT%H:%M:%S.%f")
local_sync_timestamp = gmt_sync_timestamp.replace(tzinfo=pytz.utc).astimezone(tz)
Hello, nice integration, I use on my Home Assistant from some time now. I've noticed that the last_synced attributes were not in my timezone. I've made some coding myself to fix it, just for your information if you want to implement in the stable release:
In sensor.py import pytz, then in extra_state_attributes: ` tz = get_localzone() gmt_sync_timestamp = datetime.datetime.strptime(self.coordinator.data["lastSyncTimestampGMT"], "%Y-%m-%dT%H:%M:%S.%f") local_sync_timestamp = gmt_sync_timestamp.replace(tzinfo=pytz.utc).astimezone(tz)
attributes = { "last_synced": local_sync_timestamp, } `
Of course pytz was added as a riquerement.
Regards