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

Invalid time stamp on iOS devices #2

Closed
Me-sudoer opened this issue Jun 19, 2021 · 3 comments
Closed

Invalid time stamp on iOS devices #2

Me-sudoer opened this issue Jun 19, 2021 · 3 comments

Comments

@Me-sudoer
Copy link

When using the integration on both the companion app in or browser (Safari/Edge Chromium) on iOS 14.6 device - the entities card displays 'Invalid Timestamp' for each stop that is monitored.

The integration runs fine on Android.

@make-all
Copy link
Owner

make-all commented Jun 19, 2021

It seems like the issue described here: https://community.home-assistant.io/t/timestamp-cant-show-in-ios-app-but-working-on-chrome/102714/3

The departure attribute has the correct format, so a workaround might be to display that instead of the state. But later comments on that issue suggest that the missing T is not the actual cause, so it maybe won't be a workaround. The state is passed to HomeAssistant as a datetime object, so any formatting is up to Home Assistant itself. The departure attribute is a string directly from the Metlink API.

make-all added a commit that referenced this issue Jun 19, 2021
As reported on issue #2, iOS is fussy about the format of timestamp strings.
The correct ISO format is actually returned by the Metlink API, but when
we parse it into a datetime object, Home Assistant later converts it back
using a more human readable format (a space instead of T between date and time).

Although I had a lot of trouble getting timestamps to display correctly
early on, it seems the format from Metlink API is OK to use as-is.
@make-all
Copy link
Owner

Please try version 1.0.2. To avoid waiting the few hours it takes HACS to notice an update, you can click on the menu button on the Metlink entry in HACS, and choose "Update Information".

@Me-sudoer
Copy link
Author

Me-sudoer commented Jun 19, 2021 via email

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