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

bachya
Copy link
Contributor

@bachya bachya 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,
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

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

balloob commented Mar 5, 2018

🐬

@bachya bachya deleted the fix-12916 branch March 5, 2018 22:56
@balloob balloob mentioned this pull request Mar 9, 2018
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pollen.com 500
3 participants