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

Addresses issues with Pollen.com API troubles #12930

Merged
merged 2 commits into from Mar 5, 2018

Conversation

Projects
None yet
3 participants
@bachya
Copy link
Contributor

commented Mar 5, 2018

Description:

Addresses a recently revealed 500 error within the Pollen.com API. In short:

  1. As long as crucial data is returned from the API, sensors are created; non-crucial data is merely ignored (whereas previously, the sensor would fail to show).
  2. Any API issues are properly caught and logged (currently logged under DEBUG – found that any other level spammed the logs way too much without a way to address).

Related issue (if applicable): fixes #12916

Pull request in home-assistant.github.io with documentation (if applicable): N/A

Example entry for configuration.yaml (if applicable):

sensor:
- platform: pollen
  zip_code: "00544"
  monitored_conditions:
    - allergy_average_forecasted
    - allergy_average_historical
    - allergy_index_today
    - allergy_index_tomorrow
    - allergy_index_yesterday
    - disease_average_forecasted

Checklist:

  • The code change is tested and works locally.

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
@@ -105,7 +105,6 @@
'maximum': 12
}]


PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_ZIP_CODE): cv.string,

This comment has been minimized.

Copy link
@balloob

balloob Mar 5, 2018

Member

For another PR: Would it make sense to validate this as just str ? That way it will enforce people to put quotes around their zip code in their config.

This comment has been minimized.

Copy link
@bachya

bachya Mar 5, 2018

Author Contributor

Ah, that's a great idea! I'll open it up.

@balloob

balloob approved these changes Mar 5, 2018

@balloob balloob merged commit 18b288d into home-assistant:dev Mar 5, 2018

5 checks passed

WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.002%) to 94.037%
Details
hound No violations found. Woof!
@balloob

This comment has been minimized.

Copy link
Member

commented Mar 5, 2018

🐬

@bachya bachya deleted the bachya:fix-12916 branch Mar 5, 2018

@balloob balloob referenced this pull request Mar 9, 2018

Merged

0.65 #12995

@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.