Skip to content

Comments

Allow ability to cancel ETA#157

Merged
awarecan merged 2 commits intomasterfrom
allow-cancel-eta
Oct 26, 2018
Merged

Allow ability to cancel ETA#157
awarecan merged 2 commits intomasterfrom
allow-cancel-eta

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