home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.46k stars 29.38k forks source link

Trådfri integration says lamps are entities no longer used #120036

Open folrewef opened 1 month ago

folrewef commented 1 month ago

The problem

After a reload all light.xxx entities have an error saying that the entity is no longer supported by the integration.

What version of Home Assistant Core has the issue?

2024.6.1

What was the last working version of Home Assistant Core?

2024.6.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

IKEA Tradfri

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.components.light Källa: helpers/entity_platform.py:374 integration: Lampa (dokumentation, ärenden) Inträffade först: 18:35:47 (3 händelser) Senast loggade: 20:14:13

Error while setting up tradfri platform for light Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 374, in _async_setup_platform await asyncio.gather(*pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 633, in async_add_entities for entity in new_entities: File "/usr/src/homeassistant/homeassistant/components/tradfri/light.py", line 41, in TradfriLight( File "/usr/src/homeassistant/homeassistant/components/tradfri/light.py", line 65, in init super().init( File "/usr/src/homeassistant/homeassistant/components/tradfri/base_class.py", line 65, in init sw_version=info.firmware_version, ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pytradfri/device/init.py", line 177, in firmware_version return self.raw[ATTR_DEVICE_FIRMWARE_VERSION]


KeyError: '3'

### Example YAML snippet

_No response_

### Anything in the logs that might be useful for us?

```txt
See above
```

### Additional information

All other entities in Tradfri have no errors. 
home-assistant[bot] commented 1 month ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (light) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `light` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign light` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


light documentation light source (message by IssueLinks)

folrewef commented 1 month ago

Removed and added integration again. Result - no light entities identified…

home-assistant[bot] commented 1 month ago

tradfri documentation tradfri source

folrewef commented 1 month ago

It seems like the problem stems from having too many items connected to the Tradfri hub. The problem disappeared when I removed a few of them.

dzjaivnt commented 1 month ago

I had the same problem with 2024.6.4, I completly restarted homeassistant and now its working normally.

dwd1 commented 1 month ago

I have the exact same error, restart VM, reboot PC doesnt solve it! I have the same amount of items connected to the tradfri hub when its working fine yesterday.

https://community.home-assistant.io/t/error-while-setting-up-tradfri-platform-for-light/700916

https://community.home-assistant.io/t/ikea-tradfri-integration-started-fail/580104

Tradfri hub restart and integration reload fixed it.

ThomasBurkitt commented 1 week ago

Is there a solution yet, i'm having the same exact issue.

ThomasBurkitt commented 1 week ago

Removed and added integration again. Result - no light entities identified…

Exactly the same thing happened to me...

rasmusjohnsson commented 1 week ago

I still have this issue reloaded everything several times

ThomasBurkitt commented 6 days ago

I still have this issue reloaded everything several times

I have reset the TRADFRI hub completely, reset the integration. Nothing works.