Skip to content
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

Hass 2023.08 - unexpected keyword argument 'device_type' when calling entity_platform.py #192

Closed
gllmlbrt opened this issue Aug 3, 2023 · 10 comments

Comments

@gllmlbrt
Copy link
Contributor

gllmlbrt commented Aug 3, 2023

Since HASS 2023.08 update, below issue pops up preventing the integration to run.

`Logger: homeassistant.components.device_tracker
Source: helpers/entity_platform.py:619
Integration: Device Tracker (documentation, issues)
First occurred: 2 August 2023 at 21:01:28 (3 occurrences)
Last logged: 08:03:15

Error adding entities for domain device_tracker with platform audiconnect
Error while setting up audiconnect platform for device_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
device = dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'device_type'
`

@gllmlbrt
Copy link
Contributor Author

gllmlbrt commented Aug 3, 2023

Workaround found:

Delete line 80 "device_type": self._component, in audi_entity.py and restart HASS

gllmlbrt added a commit to gllmlbrt/audi_connect_ha that referenced this issue Aug 3, 2023
gllmlbrt added a commit to gllmlbrt/audi_connect_ha that referenced this issue Aug 3, 2023
@Flashlab2
Copy link

Thanks, this works!

@rgcouto
Copy link

rgcouto commented Aug 3, 2023

Same here!

@Heelderpeel
Copy link

Thnx, works perfect for me

@euri911
Copy link

euri911 commented Aug 5, 2023

Workaround found:

Delete line 80 "device_type": self._component, in audi_entity.py and restart HASS

Thanks for the info, now it works again.

However, what is the impact of this removal (if any)?

Cheers,
Evripidis

@Heelderpeel
Copy link

For the device tracker the same action works.
in device_tracker.py Simple put a # for line 124 it looks like this:
# "device_type": "device_tracker",

@TheDelta
Copy link

TheDelta commented Aug 6, 2023

I think there is no impact, it seems to me that they added validation to the config and thats why it doesn't work anymore: (see history https://github.com/home-assistant/core/commits/42bca0f94a393ed841f03f7d60d99d2881851b47/homeassistant/helpers/device_registry.py)

If I look at https://developers.home-assistant.io/docs/device_registry_index/#device-properties then I don't see anything where device_type (or similar) would be needed.

@matteoopc
Copy link

Works! thanks!

@bigramonk
Copy link

Workaround found:

Delete line 80 "device_type": self._component, in audi_entity.py and restart HASS

Thanks !!
Reloading the integration was enough for me, no need to restart HA

@wautersj
Copy link

wautersj commented Sep 5, 2023

Workaround found:

Delete line 80 "device_type": self._component, in audi_entity.py and restart HASS

Works nicely!
Thanks a bunch!

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

No branches or pull requests

9 participants