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

Allow ability to cancel ETA #157

Merged
merged 2 commits into from
Oct 26, 2018
Merged

Allow ability to cancel ETA #157

merged 2 commits into from
Oct 26, 2018

Conversation

schmittx
Copy link
Collaborator

@schmittx schmittx commented Oct 24, 2018

@schmittx schmittx requested a review from awarecan October 24, 2018 12:04
Copy link
Collaborator

@awarecan awarecan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't run the code

nest/nest.py Outdated
"""
Cancel estimated arrival winow.
"""
self._set_eta(trip_id, int(0), datetime.datetime.now())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self._set_eta(trip_id, int(0), None)


data = {'trip_id': trip_id,
'estimated_arrival_window_begin': eta_begin,
'estimated_arrival_window_end': eta_end}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data = {'trip_id': trip_id,
            'estimated_arrival_window_begin': eta_begin}
if eta_end is not None:
    data[estimated_arrival_window_end] = eta_end

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that estimated_arrival_window_end must be included even if estimated_arrival_window_begin is set to int(0)

@schmittx
Copy link
Collaborator Author

Should be good now.

I've confirmed against a WIP PR for HASS too, just need to merge this and publish to PyPi, then PR to HASS can be submitted.

@awarecan awarecan merged commit 9e00fe2 into master Oct 26, 2018
@schmittx schmittx deleted the allow-cancel-eta branch October 26, 2018 23:51
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

Successfully merging this pull request may close these issues.

2 participants