-
Notifications
You must be signed in to change notification settings - Fork 58
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
Conversation
schmittx
commented
Oct 24, 2018
•
edited
Loading
edited
- Fixes Allow cancel ETA #153
- Can someone review and let me know if there's any concerns before merging?
There was a problem hiding this 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()) |
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
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. |