fuatakgun / eufy_security

Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
847 stars 73 forks source link

HA 2023.8 Beta 0 break integration #855

Closed m7r closed 11 months ago

m7r commented 11 months ago

Describe the bug

Integration will not load. Error in Log:

Logger: homeassistant.components.switch Source: helpers/entity_platform.py:619 Integration: Schalter (documentation, issues) First occurred: 27. Juli 2023 um 16:13:19 (2 occurrences) Last logged: 27. Juli 2023 um 16:13:19

Error adding entities for domain switch with platform eufy_security Error while setting up eufy_security platform for switch 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 'hardware'

To reproduce

Steps to reproduce the behavior:

  1. Update to HA 2023.8 beta
  2. check the log
  3. See error

*Expected behavior

Integration will add all entities

Additional information

Go to Settings -> System -> Repairs -> Click on 3 dots (...) -> System Information and get Version and Installation Type to below fields;

Hardware Information;

Additional context

Add any other context about the problem goes here.

Cheerpipe commented 11 months ago

As a workaround, remove the following lines until a better or official fix.

https://github.com/fuatakgun/eufy_security/blob/82092da65ee13ea996705cc7b48b7da1de5c5382/custom_components/eufy_security/util.py#L63-L64

m7r commented 11 months ago

Workaround work on my side too 👍🏻

Prash1407 commented 11 months ago

This workaround worked from me too! Thanks

fuatakgun commented 11 months ago

let me keep this open until someone confirms

Prash1407 commented 11 months ago

let me keep this open until someone confirms

It is working for me :-)

Another bug report related to this > https://github.com/fuatakgun/eufy_security/issues/856

steffenstolz commented 11 months ago

Works as well with HA core-2023.8.1

buzurk26 commented 11 months ago

Work around fixed it for me too

adam-cobb commented 10 months ago

I don't appear to have a util.py in that folder to try the workaround, am I missing something?

fuatakgun commented 10 months ago

Having the latest version of integration and home assistant should fix it automatically, no need to play with files manually.

MarshallRDC commented 10 months ago

Having the latest version of integration and home assistant should fix it automatically, no need to play with files manually.

Hello @fuatakgun , Just as An fyi, I had this issue since latest HA update as well (don't know if it was OS or HA version since I did them right achter each other). After Modifying the util.py file everything worked again. I had latest integration and add-on installed.

BR, Robin

fuatakgun commented 10 months ago

Which line did you remove exactly?

MarshallRDC commented 10 months ago

As a workaround, remove the following lines until a better or official fix.

https://github.com/fuatakgun/eufy_security/blob/82092da65ee13ea996705cc7b48b7da1de5c5382/custom_components/eufy_security/util.py#L63-L64

@fuatakgun like in this post.

fuatakgun commented 10 months ago

These lines do not exist anymore on the latest version of integration. How can you remove non-existent lines from code???

https://github.com/fuatakgun/eufy_security/blob/7215e274c6e2730dd0bd2376fd27c07badc9178d/custom_components/eufy_security/util.py#L60

MarshallRDC commented 10 months ago

OH wow, I've just noticed eufy security was not Listed in HACS anymore, so probably didn't update for a while 🙈 my bad... Good I found out now 😅 sorry for the inconvenience and thanks for your support.