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

Add 2 plugs #32

Open Frikigi opened 3 years ago

Frikigi commented 3 years ago

Hello, I tried to install 2 plug but it's not working, i can use only one because the other not appear I try this different configuration and i try also to insert IP ADRESS of the rooter but in this case, nothing plug appear. 192.168.0.21 is the IP adresse of the firt plug and 192.168.0.35 to the second.

n1

switch:
##Plug1
    platform: tapo_p100_control
    ip_address: 192.168.0.21
    email: xxx
    password: xxxx

switch:
##Plug2
    platform: tapo_p100_control
    ip_address: 192.168.0.35
    email: xxx
    password: xxx

n2

switch:
##Plug1
    platform: tapo_p100_control
    ip_address: 192.168.0.21
    email: xxxx
    password: xxx

##Plug2
    platform: tapo_p100_control
    ip_address: 192.168.0.35
    email: xxx
    password: xxx

n3

switch:
##Plug1 and 2
    platform: tapo_p100_control
    ip_address: 192.168.0.21
    ip_address: 192.168.0.35
    email: xxx
    password: xxx

How i can add another plug to Home Assistant with this plugin ? Thank you for reading. 😄

Clairyfy commented 3 years ago

Hello! None of my the version of code you showed worked for me. But I got one code working if you put switch 1: and switch 2: otherwise, it will say multiple switches or something like that. `

P100 or P105 Plug

switch 1: platform: tapo_p100_control ip_address: 192.168.xx.xx email: xxx.xxx@gmail.com password: xxx

P100 or P105 Plug

switch 2: platform: tapo_p100_control ip_address: 192.168.xx.xx email: xxx.xxx@gmail.com password: xxx ` I hope this works for you too

Clairyfy commented 3 years ago

Still don't know how to write the code in a box like you did. Sorry.

u8l-git commented 3 years ago

Hi. Im still quite new to home assistant and YAML. But it works well with more than one plug in home assistant with the following syntax:

switch:
  - platform: tapo_p100_control
    ip_address: 192.168.x.10
    email: email@gmail.com
    password: some_password

  - platform: tapo_p100_control
    ip_address: 192.168.x.11
    email: email@gmail.com
    password: some_password

Note the ' - ' before platform.

Also the devices show up with the names set in the tapo app.

realzoulou commented 2 years ago

Using "switch 1:" and "switch 2:" (and so on) worked for me. The ' - ' before platform did not work for me