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

Resolves #17196, Resolves #18739 - Hue Beyond light fixture errors #19874

Merged
merged 3 commits into from Jan 9, 2019

Conversation

Projects
None yet
4 participants
@alistairg
Copy link
Contributor

alistairg commented Jan 8, 2019

Description:

Hue Beyond light fixtures report themselves as special groups, that were not correctly recognized by the platform. This lead to various "no entity id" errors amongst others.

This pull adds recognition for the "Luminaire" and "LightGroup" group types, which resolves this error.

**Related issue (if applicable): Fixes #17196, Fixes #18739

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

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

If user exposed functionality or configuration variables are added/changed:

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@@ -298,7 +304,7 @@ def effect_list(self):
@property
def device_info(self):
"""Return the device info."""
if self.light.type in ('LightGroup', 'Room'):
if self.light.type in ('LightGroup', 'Room', 'Luminaire', 'LightSource'):

This comment has been minimized.

@houndci-bot

houndci-bot Jan 8, 2019

line too long (81 > 79 characters)

@@ -202,7 +205,10 @@

new_lights.append(current[item_id])
elif item_id not in progress_waiting:
current[item_id].async_schedule_update_ha_state()
if current[item_id].entity_id is None:
_LOGGER.error("ERROR: Current Item %s has no entity ID in API type '%s'. Skipping update.", current[item_id].name, api_type)

This comment has been minimized.

@houndci-bot

houndci-bot Jan 8, 2019

line too long (140 > 79 characters)

@@ -181,7 +181,10 @@

for light_id, light in current.items():
if light_id not in progress_waiting:
light.async_schedule_update_ha_state()
if light.entity_id is None:
_LOGGER.error("ERROR: Light %s has no entity ID. Skipping update.", light.name)

This comment has been minimized.

@houndci-bot

houndci-bot Jan 8, 2019

line too long (99 > 79 characters)

@@ -298,7 +298,8 @@ def effect_list(self):
@property
def device_info(self):
"""Return the device info."""
if self.light.type in ('LightGroup', 'Room'):
if self.light.type in ('LightGroup', 'Room',

This comment has been minimized.

@houndci-bot

houndci-bot Jan 8, 2019

trailing whitespace

@@ -181,7 +181,7 @@

for light_id, light in current.items():
if light_id not in progress_waiting:
light.async_schedule_update_ha_state()
light.async_schedule_update_ha_state()

This comment has been minimized.

@houndci-bot

houndci-bot Jan 8, 2019

trailing whitespace

@balloob balloob added this to the 0.85.0 milestone Jan 9, 2019

@balloob

This comment has been minimized.

Copy link
Member

balloob commented Jan 9, 2019

Nice catch.

@balloob balloob merged commit 35cb045 into home-assistant:dev Jan 9, 2019

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.006%) to 93.043%
Details

@wafflebot wafflebot bot removed the in progress label Jan 9, 2019

balloob added a commit that referenced this pull request Jan 9, 2019

Resolves #17196, Resolves #18739 - Hue Beyond light fixture errors (#…
…19874)

* Resolves #17196, Resolves #18739 - Hue Beyond light fixtures being incorrectly recognized

* Removed long code lines that were failing code review

* Removed trailing whitespace

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

rymsha added a commit to rymsha/home-assistant that referenced this pull request Jan 12, 2019

Resolves home-assistant#17196, Resolves home-assistant#18739 - Hue Be…
…yond light fixture errors (home-assistant#19874)

* Resolves home-assistant#17196, Resolves home-assistant#18739 - Hue Beyond light fixtures being incorrectly recognized

* Removed long code lines that were failing code review

* Removed trailing whitespace

rymsha added a commit to rymsha/home-assistant that referenced this pull request Jan 12, 2019

Resolves home-assistant#17196, Resolves home-assistant#18739 - Hue Be…
…yond light fixture errors (home-assistant#19874)

* Resolves home-assistant#17196, Resolves home-assistant#18739 - Hue Beyond light fixtures being incorrectly recognized

* Removed long code lines that were failing code review

* Removed trailing whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment