0.66 changes for Hue

OK, thank you for your input.
I have the latest version of the fw for the hub so I agree, it´s probably not that.

Would be nice to know exactly what packages that needs to be removed manually to get this to work…

Thanks for the reply. I’ve been able to so some more exhaustive testing (family away:grinning:). I upgraded to 66.1 again. I’m no longer getting the timeout messages, and mostly the hue component is working - I can switch lights on/off, adjust brightness etc.

What doesn’t seem to be working is the hue_activate_scene - according to the hass log it is invoked and executed, but nothing happens:

INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=hue, service=hue_activate_scene, service_data=group_name=Back Bedroom, scene_name=Normal, service_call_id=1970511856-103
INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1970511856-103

I’ve tried manually installing astral-1.5, async-timeout-2.0.0, aiohttp-3.0.6, but no change in behaviour.

Is there anything else you’d like me to try?

Running on Raspberry Pi (Jessie), virtual environment, Hue is automatically discovered

Did another try with 0.670-DEV, still no go :frowning:

These settings:

    - host:
      filename: phue.conf
      allow_unreachable: true
      allow_hue_groups: true


{“”: {“username”: “akTiTO5An2N0XNh5ze1XYsy9JwiV361dpuWDS3DS”}}

Updated my hassio to 0.67b0 yesterday and ran into trouble with Hue as well. What I did:

  • Removed philips_hue from ignore list in discovery component

  • Settings like:

    - host:
  • I first removed my phue.conf file but figured out I needed it for Hue to get added. It wouldn’t discover Hue without it in my case. If you don’t have phue.conf it any longer. Look here on how to get hold of the API-key.

  • Removed everything “Hue-like” in deps and custom_components folders. After restarting hassio this got my lights back, but since I was using the (excellent I must add) Hue-sensor component by @robmarkcole , I re-added custom_components/sensor/hue.py as instructed on his page. Make sure the API-key is the same as in your phue.conf.

And “ta-da”, everything’s working like a charm.


Thank you
Deleted the whole deps folder and now finally it is showing


No luck. In the deps folder I have nothing referring to hue. Shall I delete the content anyway? Tx

Yes. Try that

1 Like

Perfect worked!
Not only hue is back but also my xeoma server :slight_smile:

tx anzi grazie :slight_smile:

1 Like

what would i need to change in my setup please:

  - host: !secret hue_ip
    allow_unreachable: true
    allow_hue_groups: true

its been like this forever, working like a charm. update from 0.65.5 to 67.1 obviously didnt go as expected…

@Mariusthvdb do you use this component: https://github.com/robmarkcole/Hue-sensors-HASS ? Has been updated…

sure, was working fine upto about an hour ago…

my Hue is causing huge issues…Hassio refuses to come back also, lights recognized on and off…

please let me ask what your settings are.
do use the discovery: or the hue: bridges: etc in config?
What does it say in the experimental configuration page? added by user?
anything else ?
Hope to have a fine Hue implementation back, just like it has been before upgrading.


I set it up just like described in the earlier post. In the Integrations page under Configuration it looks like this:

If your Hassio isn’t working, it seems you have other issues as well. Try to comment out all Hue-config and verify that everything else is working before you check the hue-config.

well, seems the new hue implementation is way off. Was working splendidly, and now suddenly HA complains about this:


while in fact it is just there alright:


switching between being seen and unavailable… its just a real nuisance at the moment.

The CC by @robmarkcole is working fine, though it now does need the sensor: - platform: hue which wasn’t necessary before the Ha change.

this is consistent, and seems interrelated:

-30 20:46:03 WARNING (MainThread) [homeassistant.setup] Setup of hassio is taking over 10 seconds.
2018-04-30 20:46:04 ERROR (MainThread) [homeassistant.components.light.hue] Unable to reach bridge
2018-04-30 20:46:07 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /supervisor/ping request
2018-04-30 20:46:07 ERROR (MainThread) [homeassistant.components.hassio] Not connected with Hass.io
2018-04-30 20:46:07 INFO (MainThread) [homeassistant.setup] Setup of domain hassio took 15.8 seconds.
2018-04-30 20:46:07 ERROR (MainThread) [homeassistant.setup] Setup failed for hassio: Component failed to initialize.

no reason to look elsewhere before this gets solved i am afraid

Similar issues with the hue component breaking here having just gone from 6.5 to 6.8.1 and upgrading the @robmarkcole CC for the sensors. Also deleted the deps folder, which changes the error, but did not fix the issue.
I have the same config settings as @frelev above, and this been working for several months.

  • The sensors are working perfectly (after making the needed additions in sensors.yaml)
  • There is an integration error similar to @vegard except the message is State: setup_error
  • There are errors trying to display any lights
  • The scripts still control the lights

There are also errors in the home-assistant.log following startup.

2018-05-04 10:29:10 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-05-04 10:29:13 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Philips hue for hue
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/config_entries.py", line 181, in async_setup
    result = await component.async_setup_entry(hass, self)
AttributeError: module 'custom_components.hue' has no attribute 'async_setup_entry'
2018-05-04 10:29:27 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform hue
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/sensor/hue.py", line 147, in setup_platform
    data = HueSensorData(parse_hue_api_response, config)
  File "/config/custom_components/sensor/hue.py", line 160, in __init__
    self.url = self._build_url(config)
  File "/config/custom_components/sensor/hue.py", line 178, in _build_url
    return "http://" + ip_address + "/api/" + token + "/sensors"
TypeError: must be str, not NoneType
2018-05-04 10:29:56 ERROR (MainThread) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
2018-05-04 10:30:17 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

Hopefully 6.8.2 will fix it? :confused:

I am running 0.68.1 in Docker with HomeAssistant and everything is working fine, so I had a look how my setup is. In configuration.yaml:

    - host:

Under discovery:, I have removed philips_hue from the ignore list. In my root folder, I also have a file called phue.conf that includes this line:

{"": {"username": "000000000API000000000000000"}}

I had a look on Hue-sensor Git and see that it had been updated with performance tweaks and the API-url was removed from hue.py and moved as a token under the sensor config. So I did the same thing, replaced custom-components/sensor/hue.py with the new one and added token and ip to my sensor-config:

  - platform: hue
    token: 000000000API00000000000

From @PEBKAC error log:

File "/config/custom_components/sensor/hue.py", line 178, in _build_url
  return "http://" + ip_address + "/api/" + token + "/sensors"
TypeError: must be str, not NoneType

I think this “NoneType” error comes from either ip_address og token is empty, ie. missing from your config? So your errors seems to originate from the Hue-Sensor component, so this is unrelated to the 0.68.1 (or any future builds). @robmarkcole, correct me if I’m totally wrong in my assumption.

@vegard as you correctly point out, both ip_address and token must be configured. I’ve pushed a fix to catch bad config, if someone can try it out and check behaviour is as expected, let me know and I will publish a new release.

Really this whole CC is ready to be rewritten as a full component, with unit tests to mitigate breaking changes. Any volunteers to help?

sure count me in…:wink:
btw, working just fine here with .68.1 and this configuration:

- platform: hue
  ip_address: !secret hue_ip
  token: !secret hue_api_key

might i suggest 2 things:
1- call it api-key, not token. The Hue api uses this as far as I know and am used to, introducing another name might be confusing
2- have version info in the CC hue.py, which will make it easier to check for latest version being used.

1 Like

My sensors.yaml has both the ip_address: and token: set. The formating is the same as the example @vegard povided above, with the token taken from the phue.conf file. Formating looks the same, no extra leading or trailing chars such as quotes or spaces…

I have tried the fix and get this on restart,

core-ssh:/config# cat home-assistant.log
2018-05-04 20:34:32 WARNING (MainThread) [homeassistant.setup] Setup of config is taking over 10 seconds.
2018-05-04 20:34:35 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Philips hue for hue
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/config_entries.py", line 181, in async_setup
    result = await component.async_setup_entry(hass, self)
AttributeError: module 'custom_components.hue' has no attribute 'async_setup_entry'
2018-05-04 20:34:42 WARNING (SyncWorker_6) [custom_components.sensor.hue] Cannot setup Hue sensors, check your config
2018-05-04 20:35:18 ERROR (SyncWorker_14) [homeassistant.core] Error doing job: Task was destroyed but it is pending!

Hope this helps!

@PEBKAC neither your hue hub nor the sensors are being setup, so there is clearly a problem with your config. Recommend following the debugging instructions here