Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification Sensor: wrong timezone information #409

Closed
ronmichel opened this issue Oct 7, 2019 · 2 comments
Closed

Notification Sensor: wrong timezone information #409

ronmichel opened this issue Oct 7, 2019 · 2 comments

Comments

@ronmichel
Copy link

There seems to be a bug in the sensor code. The sensor data is from the "date_time" key with no time zone information. If HA is in another timezone than the Echo device it will get mixed up. In any case the +x hours in the sensor state ist confusing.
The sensor should used the "alarmTime" key for the unix timestamp and just convert it for the sensor state with timestamp_local.

@alandtse
Copy link
Owner

alandtse commented Oct 8, 2019

The issue is alarmTime is only populated sometimes for alarms. We can change it so it uses alarmTime when it's available but still won't resolve all cases.

date_time is taking the originalDate and originalTime fields that are always there for alarms but yes they don't give timestamp info. In theory we should grab the local timezone of the echo and then populate that data but that will take another API call to figure out, assuming it's available. I think I tried to find it but it didn't exist and would have to be computed from the location.

The +x hours is the format HA actually expects per the design docs which require ISO8601.

@alandtse
Copy link
Owner

alandtse commented Oct 8, 2019

Please test.

alandtse added a commit that referenced this issue Oct 9, 2019
fix(sensor): set timezone of naive date_time alarms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants