Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Issue with Hue Sensor loading on 104.0 and 104.1 #170

Closed
flipside786 opened this issue Jan 18, 2020 · 8 comments
Closed

Issue with Hue Sensor loading on 104.0 and 104.1 #170

flipside786 opened this issue Jan 18, 2020 · 8 comments

Comments

@flipside786
Copy link

Hi,

I have observed seeing an issue with the hue sensor custom component loading after the 104 update.

Error logs show failing on all sensor types (binary, device tracker, and sensor).

Does anyone else have the same issue?

@raoulteeuwen
Copy link

I also upgraded to 104.1, saw HA auto discovered a new device, found out HA was offering to link to Hue again, but when i tried, it failed. Not at home at the moment, so when i get back i'll try to maybe delete the existing integration and see whether i can add it again.

@robmarkcole any idea?

@bryanklingner
Copy link

+1, my Hue remote is broken with 0.104.2:

Jan 20 08:48:26 nasty docker[3116]: 2020-01-20 08:48:26 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform huesensor
Jan 20 08:48:26 nasty docker[3116]: Traceback (most recent call last):
Jan 20 08:48:26 nasty docker[3116]:   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 158, in _async_setup_platform
Jan 20 08:48:26 nasty docker[3116]:     await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
Jan 20 08:48:26 nasty docker[3116]:   File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
Jan 20 08:48:26 nasty docker[3116]:     return fut.result()
Jan 20 08:48:26 nasty docker[3116]:   File "/config/custom_components/huesensor/sensor.py", line 168, in async_setup_platform
Jan 20 08:48:26 nasty docker[3116]:     await data.async_update_info()
Jan 20 08:48:26 nasty docker[3116]:   File "/config/custom_components/huesensor/sensor.py", line 225, in async_update_info
Jan 20 08:48:26 nasty docker[3116]:     bridges = get_bridges(self.hass)
Jan 20 08:48:26 nasty docker[3116]:   File "/config/custom_components/huesensor/sensor.py", line 148, in get_bridges
Jan 20 08:48:26 nasty docker[3116]:     for entry in hass.data[hue.DOMAIN].values()
Jan 20 08:48:26 nasty docker[3116]: KeyError: 'hue'

@robmarkcole
Copy link
Owner

Appears to be a breaking change relating to this PR. From the HA release notes: Hue will no longer import existing authentication from disk. It has not written this authentication to disk since March 2018. The config option has been deprecated and will be removed in 0.106

@Mariusthvdb
Copy link
Contributor

fwiw, I am on 104.2, and don't see any new Hue errors, nor are my sensors gone. Everything fully up and running, as it was before.

I do see my hubs listed under newly discovered integrations and haven decided what to click. Ignore or configure.....

@bkonijn
Copy link

bkonijn commented Jan 20, 2020

HI, I removed the files from the custom_components directory and uploaded the most recent files from github. Now it works again.

@bryanklingner
Copy link

Thanks @bkonijn, I forgot to sync to the latest release of Hue-sensors-HASS from github. When I do so, the huesensor works properly.

@flipside786
Copy link
Author

I tried the same thing and it didnt work. Here is the steps i did:

  1. Deleted the Philips Hue Hub
  2. Re-Added the Hue Hub via HomeAssistant Front End
  3. Refreshed the custom components folder from github
  4. Restarted HomeAssistant

Here are the errors i am getting (binary_sensor and sensor):

2020-01-21 05:09:29 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up pla$
Traceback (most recent call last):
File "/srv/homeassistant2/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 15$
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/home/homeassistant/.homeassistant/custom_components/hue_custom/binary_sensor.py", line 145, in as$
await data.async_update_info()
File "/home/homeassistant/.homeassistant/custom_components/hue_custom/binary_sensor.py", line 202, in as$
bridges = get_bridges(self.hass)
File "/home/homeassistant/.homeassistant/custom_components/hue_custom/binary_sensor.py", line 125, in ge$
for entry in hass.data[hue.DOMAIN].values()
KeyError: 'hue'

2020-01-21 05:09:29 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform h$
Traceback (most recent call last):
File "/srv/homeassistant2/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 15$
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/home/homeassistant/.homeassistant/custom_components/hue_custom/sensor.py", line 249, in async_set$
await data.async_update_info()
File "/home/homeassistant/.homeassistant/custom_components/hue_custom/sensor.py", line 306, in async_upd$
bridges = get_bridges(self.hass)
File "/home/homeassistant/.homeassistant/custom_components/hue_custom/sensor.py", line 229, in get_bridg$
for entry in hass.data[hue.DOMAIN].values()
KeyError: 'hue'

Thanks

@flipside786
Copy link
Author

Sorry my apologies its now working for me.

I had a different folder name for the hue sensor in the "custom_components" folder. After changing the name of the folder from "hue_custom" to "huesensor" it started working. Its weird that it was working prior to 104, but HA must not like using a different custom folder name.

Thanks for the support everybody.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants