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

Fix london_underground issue #19642

Merged
merged 7 commits into from Dec 31, 2018

Conversation

@robmarkcole
Copy link
Contributor

robmarkcole commented Dec 29, 2018

Description:

Now using https://pypi.org/project/london-tube-status/

Related issue (if applicable): fixes #19639

reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
reason = ' *** '.join([status['disruption']['additionalInfo']
for status in line['lineStatuses']])

This comment has been minimized.

@houndci-bot

houndci-bot Dec 29, 2018

continuation line over-indented for visual indent

statuses = [status['statusSeverityDescription']
for status in line['lineStatuses']]
state = ' + '.join(sorted(set(statuses)))

if state == 'Good Service':
if state == 'Good Service': # if good status, this is the only status returned

This comment has been minimized.

@houndci-bot

houndci-bot Dec 29, 2018

line too long (88 > 79 characters)

reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
reason = ' *** '.join([status['disruption']['additionalInfo']
for status in line['lineStatuses']])

This comment has been minimized.

@houndci-bot

houndci-bot Dec 29, 2018

continuation line under-indented for visual indent

@@ -127,7 +128,10 @@ def parse_api_response(response):
reason = 'Nothing to report'
else:
reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
[status['disruption']['additionalInfo'] for status
in line['lineStatuses']]

This comment has been minimized.

@houndci-bot

houndci-bot Dec 29, 2018

continuation line under-indented for visual indent

This comment has been minimized.

@robmarkcole

robmarkcole Dec 29, 2018

Contributor

Can anyone help here? Spent 15 mins trying this

@@ -127,7 +128,10 @@ def parse_api_response(response):
reason = 'Nothing to report'
else:
reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
[status['disruption']['additionalInfo'] for status

This comment has been minimized.

@houndci-bot

houndci-bot Dec 29, 2018

trailing whitespace

@robmarkcole robmarkcole force-pushed the robmarkcole:fix-tube branch from d7352f9 to e03c671 Dec 30, 2018

statuses = [status['statusSeverityDescription']
for status in line['lineStatuses']]
state = ' + '.join(sorted(set(statuses)))

if state == 'Good Service':
reason = 'Nothing to report'
else:
reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
reason = " *** ".join(

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Dec 30, 2018

Member

The service interface, I/O and data parsing, should be moved to a standalone library published on pypi.

https://developers.home-assistant.io/docs/en/creating_platform_code_review.html#6-communication-with-devices-services

This comment has been minimized.

@robmarkcole

robmarkcole Dec 30, 2018

Contributor

Will do

robmarkcole added some commits Dec 29, 2018

@robmarkcole robmarkcole force-pushed the robmarkcole:fix-tube branch from 77a9400 to e6f2f8a Dec 31, 2018

@robmarkcole

This comment has been minimized.

Copy link
Contributor

robmarkcole commented Dec 31, 2018

@MartinHjelmare changes made

@MartinHjelmare
Copy link
Member

MartinHjelmare left a comment

Good!

@MartinHjelmare MartinHjelmare merged commit ff80fc3 into home-assistant:dev Dec 31, 2018

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.003%) to 93.055%
Details

@wafflebot wafflebot bot removed the in progress label Dec 31, 2018

@robmarkcole robmarkcole deleted the robmarkcole:fix-tube branch Dec 31, 2018

@robmarkcole

This comment has been minimized.

Copy link
Contributor

robmarkcole commented Dec 31, 2018

Thanks!

mxworm added a commit to mxworm/home-assistant that referenced this pull request Jan 3, 2019

Merge branch 'dev' into current
* dev:
  Adds ability to calibrate temperature for BME680 (home-assistant#19684)
  Bumping aioasuswrt version to 1.1.17 (home-assistant#19714)
  Bump pyotgw to 0.4b1 (home-assistant#19715)
  Envisalink pgm (home-assistant#19499)
  Update pyhomematic 0.1.54 + small fixes (home-assistant#19667)
  Add ness alarm control panel using nessclient (home-assistant#18463)
  Add support for color_temp_command_template in MQTT light component (home-assistant#19675)
  Improve rflink coverage (home-assistant#19596)
  Luftdaten traceback (home-assistant#19666)
  Fix london_underground issue (home-assistant#19642)
  Add IDTECK proximity card component (home-assistant#18309)
  Fix homekit_controller pairing regression (home-assistant#19654)
  Fix error in got_connected for remote.harmony (home-assistant#19662)
  Fix exception checking for next dublin bus (home-assistant#19663)
  Added regexp validation allowing Twilio notifications to use Sender ID instead of phone number (home-assistant#19644)
  pytraccar version bump (home-assistant#19659)
  Suppress traceback if network is not available

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

kellerza added a commit to kellerza/home-assistant that referenced this pull request Jan 18, 2019

Fix london_underground issue (home-assistant#19642)
* Update london_underground.py

* Update test

* Update london_underground.py

* Update london_underground.py

* Update london_underground.py

* Fix lint

* Use london-tube-status==0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment