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
71.89k stars 30.12k forks source link

Elk M1 integration not loading on 2023.6.3 #95495

Closed starman2k01 closed 1 year ago

starman2k01 commented 1 year ago

The problem

Logger: homeassistant.config_entries Source: custom_components/elkm1/init.py:299 Integration: Elk-M1 Control First occurred: 10:41:01 AM (2 occurrences) Last logged: 10:44:07 AM

Error setting up entry ElkM1 daf6ba for elkm1 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/elkm1/init.py", line 299, in async_setup_entry hass.config_entries.async_setup_platforms(entry, PLATFORMS) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

What version of Home Assistant Core has the issue?

2023.6.3

What was the last working version of Home Assistant Core?

2023.4.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Elk M1

Link to integration documentation on our website

https://www.home-assistant.io/integrations/elkm1/

Diagnostics information

Logger: homeassistant.config_entries Source: custom_components/elkm1/init.py:299 Integration: Elk-M1 Control First occurred: 10:41:01 AM (2 occurrences) Last logged: 10:44:07 AM

Error setting up entry ElkM1 daf6ba for elkm1 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/elkm1/init.py", line 299, in async_setup_entry hass.config_entries.async_setup_platforms(entry, PLATFORMS) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @gwww, @bdraco, mind taking a look at this issue as it has been labeled with an integration (elkm1) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `elkm1` 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 elkm1` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


elkm1 documentation elkm1 source (message by IssueLinks)

bdraco commented 1 year ago

Delete the custom component and restart

starman2k01 commented 1 year ago

Did that, twice. Refuses to login. Also tried setting "unsecure access" on Elk and logging in, refuses login as well. Works fine on 2023.4.5.

bdraco commented 1 year ago

How did you delete the custom version?

starman2k01 commented 1 year ago

Just by deleting the integration from the UI. But it won't delete. Every reboot it comes back! Definitely not correct behavior. I deleted it before the upgrade, after the upgrade, but it won't go away!

bdraco commented 1 year ago

You need to delete the custom component not the integration in the UI

starman2k01 commented 1 year ago

I guess I'm confused-- Elk is not a HACS integration, I thought it was core. How do you delete Elk if not with the UI? And why do you need to delete the integration to make it work again?

bdraco commented 1 year ago

Where did the custom version come from?

starman2k01 commented 1 year ago

I never said I had a custom version. I know the log above has it in custom components but don't know where it came from. The only thing "custom" is my config.yaml has some Elk filters: elkm1: host: elk://192.168.1.90 username: xxxx password: xxxx area: exclude: [3-8] zone: enabled: true exclude: [64-192,197-208] plc: enabled: false exclude: [a1-p16] task: enabled: false exclude: [1-32] output: enabled: true exclude: [18-192,197-208] thermostat: enabled: false exclude: [1-16] counter: enabled: false exclude: [1-64] setting: enabled: false exclude: [1-20]

starman2k01 commented 1 year ago

And I tried commenting out the yaml and rebooting, upgrading, but I still can't login and setup Elk.

bdraco commented 1 year ago

rm -rf /config/custom_components/elkm1

starman2k01 commented 1 year ago

Okay that did it! Thank you for the patient help. I really don't understand how the custom configuration was installed, unless it was maybe a way old version of the integration? Really don't understand this.

starman2k01 commented 1 year ago

FYI this method did blow away all of my entities and replace them with new entities beginning with the string "ElkM1". Not sure why it did that. Had to install French's Spook integration to try to delete all the old stuff and now I have to replace my lovelace cards with new entities.