Can't read data from TP-Link Kasa H110 plug

I recently replaced a TP-Link Kasa H100 plug by a H110 plug. The H100 does simple 0n/Off, the H110 in addition provides metering info (power, voltage, …).

As I wanted the new H110 plug to keep the same name as the old H100 one, I used the Kasa app to rename the H100 some something else, then gave the 110 plug the name of the H100, “nuc”.
I then reloaded the TP-Link integration but this didn’t seem to be enough to pick up the change, the entity was now called “nuc_2”. I uninstalled and reinstalled the TP-Link integration, which allowed the entity to be picked up with the correct name “nuc”.

In Developpers Tool I can see all the state attributes like voltage, current_power_w, etc… I also see them in Automations or simply in the entity info.
But when I want to use them in a Lovelace card, I can’t find them.

I have a second H110 plug on my 3D printer, and that plug’s state attributes are avaible for E.g. sensor cards in Lovelace.

So it looks to me as if, despite the re-installation of the TP-Link integration and subsequent rediscovery of the plugs, there was still something from the previous configuration which makes the plug is not correctly seen in the Lovelace edit interface.

Any idea what I can do to solve this?

The TP-Link integration only creates a switch entity for each plug. When you want to have the metering information as sensors you need to add some template sensors.

Want lovcelace card do you use for that? Maybe you have already template sensors for that or the attributes are displayed directly.

OK, got it :sweat_smile: !
I had forgotten that I had created templates for the first H110…
So you need to create templates for each plug… Is there a way to avoid that? I guess this would need to be built in the integration?

Yes, for now you need to create the template sensors for each plug. But basically it should be possible to add that to the integration so that entities are added for the several attributes.