You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.64.1
Python release (python3 --version):
3.6.1
Component/platform: sensor/pollen
Description of problem:
ZIP codes with leading zeros (e.g., 00544, which is Holtsville, New York) are not parsed properly from configuration.yaml. Although this issue was discovered via the Pollen.com sensor, it is not an issue unique to that sensor; the solution lies somewhere deeper.
...the following error shows in the logs (asterisks around the crucial part):
2018-02-28 12:19:13 ERROR (SyncWorker_2) [homeassistant.components.sensor.pollen] An error occurred while retrieving data
2018-02-28 12:19:13 DEBUG (SyncWorker_2) [homeassistant.components.sensor.pollen] 404 Client Error: Not Found for url: https://www.pollen.com/api/forecast/extended/pollen/**356**
Notice the 356 at the tail end of the URL – it appears that PyYAML is interpreting that int as an octal number (00544 in decimal = 356 in octal).
...the error changes (again, asterisks around the crucial part):
2018-02-28 12:19:13 ERROR (SyncWorker_2) [homeassistant.components.sensor.pollen] An error occurred while retrieving data
2018-02-28 12:19:13 DEBUG (SyncWorker_2) [homeassistant.components.sensor.pollen] 404 Client Error: Not Found for url: https://www.pollen.com/api/forecast/extended/pollen/**544**
Although no octal conversion is occurring, the leading zeroes are still being stripped off.
Expected:
The quoted version of the int should be cast as a string. Open to other alternatives, as well.
Problem-relevant configuration.yaml entries and steps to reproduce:
See above for an example that reveals the issue.
Traceback (if applicable):
N/A
The text was updated successfully, but these errors were encountered:
The octal thing is part of the yaml spec, no way around that.
You're quoting the zip, but the pollen sensor has a validator that casts it as a positive int, and that's how it's passed into the Client constructor. I think just changing that to cv.string should work ...
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):0.64.1
Python release (
python3 --version
):3.6.1
Component/platform:
sensor/pollen
Description of problem:
ZIP codes with leading zeros (e.g., 00544, which is Holtsville, New York) are not parsed properly from
configuration.yaml
. Although this issue was discovered via the Pollen.com sensor, it is not an issue unique to that sensor; the solution lies somewhere deeper.If a bare, unquoted ZIP is provided:
...the following error shows in the logs (asterisks around the crucial part):
Notice the
356
at the tail end of the URL – it appears that PyYAML is interpreting that int as an octal number (00544
in decimal =356
in octal).If a quoted version of the ZIP code is used:
...the error changes (again, asterisks around the crucial part):
Although no octal conversion is occurring, the leading zeroes are still being stripped off.
Expected:
The quoted version of the int should be cast as a string. Open to other alternatives, as well.
Problem-relevant
configuration.yaml
entries and steps to reproduce:See above for an example that reveals the issue.
Traceback (if applicable):
N/A
The text was updated successfully, but these errors were encountered: