Yaml configuration for Tapo plug

Hi, I’m trying to add a Tapo smart plug (P110) to Home assistant. When I add is as an integraion in the UI, it works perfectly. It creates 1 device and 3 entities:

  • switch.<name>
  • sensor.<name>_current_energy
  • sensor.<name>_today_energy

But I’m unable to do the same in yaml configuration. I only managed to create entity for the switch (without a device). How can I create entities for the sensors as well and group them together with the switch entity into a single device (so it can be easily displayed in dashboard)? I’m getting an error that suggests that this approach is not even possible, is that right?

The tapo platform for the sensor integration does not support platform setup. Please remove it from your config.

although, i cannot help you. From your post i found why i couldnt find the current sensor: i added the P110 through the YAML file…

I’ve run into the same issue and created a pull request with a fix that works for me. You can find it at Support adding sensors trough configuration.yaml by legolasbo · Pull Request #382 · petretiandrea/home-assistant-tapo-p100 · GitHub. Maybe you can see if it works for you as well and report your findings on the PR.