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

Display tide predictions in an easier to read format #19

Open
ianByrne opened this issue Jul 26, 2023 · 0 comments
Open

Display tide predictions in an easier to read format #19

ianByrne opened this issue Jul 26, 2023 · 0 comments

Comments

@ianByrne
Copy link
Owner

Currently the tide sensor has a predictions attribute which is made up of an array of arrays:

predictions: [ [ '2023-01-01 06:00:00', '1.6' ], [ '2023-01-01 13:00:00', '0.2' ] ]

Perhaps it can be refactored into something more meaningful, like an array of objects:

predictions:
  - datetime: 2023-01-01 06:00:00
    height: 1.6
    event: high tide
  - datetime: 2023-01-01 13:00:00
    height: 0.2
    event: low tide

Either refactored (causing breaking changes for anyone using the attribute), or as a new attribute for backwards compatibility.

As requested here. PRs welcome

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

1 participant