fishbigger / HomeAssistant-Tapo-P100-Control

A custom integration for home assistant to control the Tapo P100 plugs
MIT License
208 stars 69 forks source link

Mapped the device MAC to unique_id to allow entity registry #34

Closed leezh closed 3 years ago

leezh commented 3 years ago

I have a few lights and switches that I'd like to be placed in different areas, but Home Assistant requires a unique_id. Details here: https://developers.home-assistant.io/docs/entity_registry_index/

After some digging around it seems like the device info dict contains the device MAC, so I've added it in. Tested and works with my L510E and P100.

wlp7s0 commented 3 years ago

Oh, thank you very much! had to play with p100 plugs and noticed that without device_id it just mixes them up after each HASS restart.

MauiR commented 3 years ago

Works great! Thanks i had the same problem.

fishbigger commented 3 years ago

This has been fixed by mapping the device_id instead of the mac address. b53e739, 9f66f50