TP-Link Switches going "Unavailable"

I’m running 0.115.5 and recently installed the TP-Link Kasa integration. Prior to this, I was using Samsungs SmartThinbs integration to detect and operate the Kasa devices. Auto discovery for the TP-Link Kasa integration has been disabled and the following lines added to configuration.yaml;

#TP Link Kasa Devices
tplink:
  discovery: false
  switch:
    - host: 192.168.2.190    #Kasa Switch - Kitchen Counter - East
    - host: 192.168.2.191    #Kasa Switch - Kitchen Counter - South
    - host: 192.168.2.192    #Kasa Switch - Studio Pot Lights
    - host: 192.168.2.210    #Kasa 3-Way - Kitchen Island
    - host: 192.168.2.215    #Kasa 3-Way - Kitchen Pots
    - host: 192.168.2.220    #EKasa Plug - Floor Lamp
    - host: 192.168.2.225    #Kasa Plug - Couch Lamp
    - host: 192.168.2.230    #Kasa Plug - Side Table
    - host: 192.168.2.235    #Kasa Plug - Dressing Table Breakfast Room
    - host: 192.168.2.240    #Kasa Plug - Dresser
    - host: 192.168.2.245    #Kasa Plug - Reading Lamp
  dimmer:
    - host: 192.168.2.195    #Kasa Dimmer - Dinning Room
    - host: 192.168.2.200    #Kasa Dimmer - Breakfast Room
    - host: 192.168.2.205    #Kasa Dimmer - Living Room

When the TP-Link Kasa integration was first configured, the dimmers showed under “Devices” and “Entities” but were marked “unavailable”. HA was restarted a couple of times before all devices showed as available. HA has been running for about twelve hours. All devices remain active.

Since changing from SmartThings to the TP-Link Kasa integration I’ve noticed Kasa devices triggered by the state change of another Kasa device take about thirty seconds to execute. For example; when the light switch for the counter light in the kitchen is turned on, the state change is noted in a script that triggers the light for the kitchen island light to turn on. When the counter light is turned on (manually), the island light turns on but only after a period of time, usually thirty seconds. I’ve checked the log and see now errors associated with the script. Any idea why there’s a delay in executing the script?

1 Like