Emulated HUE - Error "Entity not exposed" - where is the file emulated_hue.ids

Hi there,
i just edited my configuration.yaml for exposing my switches and lights via emluated hue. First i forgot to set “expose_by_default” to false and so all 140 switches / lights get exposed… even that ones, that are no “real switches” (like some settings from devices).
So i changed all and only expose some of my entities by listing them explizit in configuration.yaml.

I see the new list of entities in the web-frontend (https:///api/v2/lights)
BUT:
i also get many many error logs like this one:

2023-11-04 21:42:25.743 ERROR (MainThread) [homeassistant.components.emulated_hue.hue_api] Entity not exposed: 44
2023-11-04 21:42:27.709 ERROR (MainThread) [homeassistant.components.emulated_hue.hue_api] Entity not exposed: 36
2023-11-04 21:42:27.767 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 150, in handle
result = handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py", line 238, in get
return self.json(create_list_of_entities(self.config, request))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py", line 876, in create_list_of_entities
json_response[config.entity_id_to_number(entity_id)] = state_to_json(
^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py", line 761, in state_to_json
state_dict = get_entity_state_dict(config, state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py", line 655, in get_entity_state_dict
return _build_entity_state_dict(entity)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py", line 687, in _build_entity_state_dict
data[STATE_BRIGHTNESS] = hass_to_hue_brightness(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/emulated_hue/hue_api.py", line 890, in hass_to_hue_brightness
return max(1, round((value / 255) * HUE_API_STATE_BRI_MAX))
~~~~~~^~~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

My question:
WHERE do i find the file to “delete” / “clean up” the ids?
I tried via SSH to the raspi, i used file-add-on… but i cant find this path!

i use home assistant core for raspberrypi.
latest version.
:frowning:
Thx a lot!

1 Like

This is a bug, report it on HA’s github. It’s related to a change where lights that are off now have a brightness attribute that’s set to None.

1 Like

I had one condition having led to this error:

check if one of your lights is sending uneven brightness values.
changing those fixed it for me!