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

Fix Prometheus casting issues #22282

Merged
merged 1 commit into from Mar 22, 2019

Conversation

Projects
None yet
4 participants
@robbiet480
Copy link
Member

commented Mar 22, 2019

Description:

Fix Prometheus casting issues

Related issue (if applicable): fixes #8659.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
@robbiet480

This comment has been minimized.

Copy link
Member Author

commented Mar 22, 2019

Requesting review from @tcastberg

@robbiet480 robbiet480 removed the request for review from rcloran Mar 22, 2019

try:
value = state_helper.state_as_number(state)
except ValueError:
_LOGGER.warning("Could not convert %s to float", state)

This comment has been minimized.

Copy link
@MartinHjelmare

MartinHjelmare Mar 22, 2019

Member

Will there be complaints about the warning? We could lower it to debug, although I think that warning is more appropriate.

This comment has been minimized.

Copy link
@robbiet480

robbiet480 Mar 22, 2019

Author Member

@tcastberg thoughts?

This comment has been minimized.

Copy link
@tcastberg

tcastberg Mar 22, 2019

Contributor

I could go either way. I'm not aware of which rules (if any) the project has for logging level detail. I'd rather have it higher than lower since I'm not sure this is a permanent fix. A more appropriate, long-term solution would automatically generate permanent, unique id's for different zones somewhere in HA. I was more worried about doing what was achievable to reduce the amount of exception spam in the logs, but I do want this to warn that it is still an issue.

@robbiet480 robbiet480 merged commit e9cd9f8 into dev Mar 22, 2019

10 checks passed

Hound No violations found. Woof!
Python 3.5 - lints Python 3.5 - lints
Details
Python 3.5 - tests Python 3.5 - tests
Details
Python 3.6 - tests Python 3.6 - tests
Details
Python 3.7 - tests Python 3.7 - tests
Details
Pyton 3.5 - typing Pyton 3.5 - typing
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.002%) to 93.674%
Details

@ghost ghost removed the in progress label Mar 22, 2019

@delete-merged-branch delete-merged-branch bot deleted the prometheus-type-fix branch Mar 22, 2019

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

Merge branch 'dev' into current
* dev: (99 commits)
  show which component is causing translation errors (home-assistant#22340)
  fix where PLATFORM_SCHEMA gets pulled from (home-assistant#22334)
  Consolidate more platforms (home-assistant#22308)
  Update file header (home-assistant#22318)
  Remove occupancy as it is not available in API (home-assistant#22320)
  Google Assistant: Add camera stream trait (home-assistant#22278)
  Add Freebox switch platform (home-assistant#21710)
  Add homematicip cloud connection quality related attributes (home-assistant#21990)
  Update abbreviation (home-assistant#22317)
  Upgrade py-cpuinfo to 5.0.0 (home-assistant#22287)
  Upgrade pylast to 3.1.0 (home-assistant#22302)
  Fix for embedded MQTT server configuration (home-assistant#22305)
  Switch from using Google Maps API for elevation to Open Elevation API (home-assistant#22306)
  Update srpenergy library (home-assistant#22307)
  Sort code owners alphabetically (home-assistant#22304)
  Update trait to support auto without ranges. (home-assistant#21847)
  Fix Prometheus casting issues (home-assistant#22282)
  Add sort by config and tests for Reddit integration (home-assistant#22081)
  Fix progress for Plex media_players (home-assistant#22224)
  Fixing the api_streams sensor (home-assistant#22200)
  ...

@balloob balloob referenced this pull request Apr 3, 2019

Merged

0.91.0 #22688

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