#tplink

1 messages · Page 1 of 1 (latest)

late verge
#

ConfigEntry is the settings of you integration

#

so for example, each integration entry is a config entry

#

Did you disable device or entry?

jolly musk
#

I disabled some trying to hunt this issue down, but even before I did that, i was getting the error.

late verge
#

but

#

did you disable device

jolly musk
#

Is there a more "raw" way to view what the config entries are? I'd like to know which one is tripping this.

late verge
#

or entry

jolly musk
#

Oh I get the question now. Let me check.

#

Looks like I disabled the entry.

late verge
jolly musk
#

Let me try disabling the device instead.

late verge
#

and then it shouldn't load

#

no device wouldnt work

jolly musk
#

Oh, so I did that the right way?

late verge
#

yea, but if everything is disabled and you shouldnt get the error

#

But you can check that in /config/.storage/core.config_entries

#

I think since 2024.4 its less human readable

jolly musk
#

I found the file. I'm going to look through it for a bit.
Thanks for that tip.

#

bingo

#

We have a TPLink entry that's missing the "host" section from its data section.

#

I took a snapshot earlier so I think it should be safe to just delete the entry and restart the integration, right?

late verge
#

please do so via the UI

#

As in, there is no real reason to do this in the file

jolly musk
#

Let me see if I can even find it.

late verge
#

how many do you have lol

jolly musk
#

13, but the issue isn't the number of them. It's that there's nothing uniquely identifying about this entry. Hold on I'm trying to figure out how to copy/paste it here so you can see it.

#

It looks like something went wrong when this entry was written.

late verge
#

if you click on the entities an entry exposes

#

you can see the config_entry_id in the url bar

#

but

#

if it doesn't boot, it also should be noticable in the UI iirc

jolly musk
#

I can't seem to copy it and I can't seem to post a screenshot here. Well let me see if I can use the trick you just recommended.

late verge
#

as in, this error happens at the very boot of the integration

#

100% the entry has no entities

jolly musk
#

Yeah this entry isn't showing up in the list, probably because it failed to load.

late verge
#

it should make it even more clear that something is wrong

jolly musk
#

Not really. It doesn't tell me which entry failed, just the line it failed on. I don't even get a stack trace in the log.

#

Oh wait I do, it's just super short.

#
Logger: homeassistant.config_entries
Source: config_entries.py:551
First occurred: 12:35:23 PM (1 occurrences)
Last logged: 12:35:23 PM
Error setting up entry TP-Link Smart Home for tplink

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tplink/__init__.py", line 131, in async_setup_entry
    host: str = entry.data[CONF_HOST]
                ~~~~~~~~~~^^^^^^^^^^^
KeyError: 'host'
late verge
#

No I mean in the

jolly musk
#

Hmm, I see. But yeah I'm not getting that.

#

Wait why are you allowed to post a screen shot?
I guess I have to become a member?

late verge
#

but its name is TP-Link Smart Home

late verge
#

They give people who help people often and stuff some more rights

#

isnt directly bound to member

#

member means that I am a core member and developing home assistant

jolly musk
#

I see. That's actually pretty fair. oh wow help from a core member

Well I do seem to have a message like that but it's saying it about 9 of my devices it seems.

#

Hold on, I might be able to get you a screenshot.

#

Hmm that didn't work. It's supposed to be a screenshot of the problematic entity.

late verge
#

it worked

#

hmm

#

it looks strange

#

I guess you can remove it from the file then

#

but I am not 100% sure when it writes data

jolly musk
#

Yeah I'm trying to guess how that ended up in there. I'm a little worried that maybe it's the config for the entire TPLink plugin, but reading the documentation... that's not how you're supposed to use this, and the source code is clearly not designed to process that.

#

Well I took a snapshot of the filesystem earlier, so if this blows up, I can revert.

#

That did it!

#

I had to do a full restart but that fixed the error.

late verge
#

how many entries do you see in the UI now?

jolly musk
#

The exact same ones I did before, same names and order too (I took a screenshot before doing this so I'm pretty confident of that)

late verge
#

oh interesting

jolly musk
#

Thank you for your help. Finding that file of entries was the key I was missing.

lofty brook
#

Hi there, I added a nextcloud Integration. Now my url changed and I don't know how to remove the old one.