I would say, get a better switch
I just spent $600+ and 3 days hooking them up. They have potential aside from the shit Kasa app. 3 automations should have been posted in more places or else I would have gone another route. But these are the best looking and go online less than any other switch I’ve tried.
I am running into the same issues. I don’t have quite any many tp link devices (5 currently) but it’s very annoying and frustrating issue. When having tp link connected to my smartthings app, smartthings app notices almost instantly. I physically turn a switch off, the app shows it off within a second or two. I do that same thing with HA and HA will show it off at some point, maybe a minute.
If you’ve figured out a solution or workaround let me know please.
Thanks!
I wish that I would have seen this before I spent a couple of K redoing all of my home with the TPLink switches and dimmers. They seem to work fine other than this. I only have a few that need this function but they are a critical few. The three limit is ridiculous for automation.
Had a problem with Kasa Automation between a Kasa Wall Switch + Kasa Outlet Plug, probably due to a recent AWS outage.
Was able to set up an automation via the UI that just updates the Wall Switch status every 2 seconds.
Based off the earlier post with the YAML settings by @JustMaier
Triggers
Trigger type: Time Pattern
Hour: Blank
Minutes: Blank
Seconds: /3
Actions
Action Type: Call service
Service: homeassistant.update_entity
Entity: (add your switch entity)
It seems that it’s suddenly stop working for me.
Hi all,
This solution is working great. Instead of an update every 30 seconds, i get an update every 5 seconds. Perfect. See below the code in code lay-out.
alias: Update TP-Link HS110
description: ''
trigger:
- platform: time_pattern
seconds: /5
condition: []
action:
- service: homeassistant.update_entity
data:
entity_id:
- switch.energiemeter_pc
- switch.energiemeter_tv
mode: single
As per Home Assistant release 2020.6, there is option to disable the polling of the integration completely, thereby fully residing on your own polling frequency: 2021.6: A little bit of everything - Home Assistant
This gives a small performance benefit: each 30 seconds, an unneeded poll is done via the integration itself, on top of your own defined schedule. By disabling this, you prevent a double poll: 5s single poll > 10s single poll >15s single poll >20s single poll >25s single poll >30s double poll > 35s single poll >etc.
Note: in the release party of 2021.6 (youtube stream), it was mentioned that you should never increase the polling rate as compared to the integration native setting (lower is ok, higher not). Reason being that each integration is already having the optimal value and going higher would introduce negative side-effects. I don’t think this is true for the TP-Link Kasa Smart integration: i think the native setting is suboptimal. I have not seen any negative side effects of a poll once-every-5-seconds.
Is there a way to disable the integration polling from within the automation?
30sec polling is ok for me most of the time, and saves space in my HA database. But occasionally I want higher resolution current consumption data, and I’ll toggle the automation on you mentioned to give me 5sec polling interval.
Is there a way to temporarily disable the native polling in the same automation?
I adjusted this with some tempting so I don’t have to list the entities manually. This is working great.
- alias: Update TP-Link Devices
description: ''
trigger:
- platform: time_pattern
seconds: /5
condition: []
action:
- service: homeassistant.update_entity
data:
entity_id: "{{ integration_entities('tplink') }}"
mode: single
@clinta @pimw Hey this is exactly what I was looking for! A couple automations were running so slow because of the polling time. Did either of you see any negative side effects? I have 35 switches and dimmers and I just might do this. I wonder if that would push the limit.
Hi, great to hear. I only have two of these, so i cannot tell you how scalable it is. But in general, polling is less efficient than pushing.