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 some unhandled exceptions due to missing null checks #16812

Merged
merged 1 commit into from
Sep 24, 2018

Conversation

OverloadUT
Copy link
Contributor

Description:

Fixed a couple cases that would produce errors when the ISY node status was None or -inf.

Related issue (if applicable): fixes #9384

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

Fixed a couple cases that would produce errors when the ISY node status was None or `-inf`.
@ghost ghost assigned OverloadUT Sep 24, 2018
@ghost ghost added the in progress label Sep 24, 2018
@balloob balloob merged commit dc1534c into home-assistant:dev Sep 24, 2018
@ghost ghost removed the in progress label Sep 24, 2018
@dethpickle
Copy link
Contributor

dethpickle commented Sep 24, 2018

Thanks @OverloadUT. I can't honestly say when the fans portion went away, but under 0.78.3 its no longer there. There still is a different start up ISY thing which looks similar:


Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 344, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 235, in async_update_ha_state
    state = self.state
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/isy994.py", line 475, in state
    return super().state
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 425, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/isy994.py", line 34, in is_on
    return self.value > 0
TypeError: '>' not supported between instances of 'NoneType' and 'int'

But, I cannot say where the fans ended and this one started. I can't even say that the above isn't my problem... other than, like the fans, everything seems to be working - just getting a couple of these on startup. So yes and yes to your questions over in #9384.

Thanks!

@OverloadUT
Copy link
Contributor Author

@dethpickle The fan issue went away with my big refactor to the isy994 component many months ago.

This PR fixes both the cover and light errors :)

@dethpickle
Copy link
Contributor

Fabulous. I appreciate the attention and look forward to the next release!

@balloob balloob mentioned this pull request Sep 28, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
@OverloadUT OverloadUT deleted the fix-isy-log-spam branch May 2, 2019 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PyISY 1.0.8 upgrade gives initialization errors with ISY 4.6.2
4 participants