I have a WiFi controlled LED light strip in my bedroom which I use as my main lights. I wanted to control them with a regular wall switch, so I installed a Kasa HS220 smart dimmer switch (not wired to any load) and wrote a Home Assistant automation. If you turn on the smart switch, the led lights come on via the automation, and similarly the brightness controls on the switch control the strip via the automation. So basically, the switch controls the lights “virtually” rather than physically.
The problem is that the Kasa switch has no way of telling Home Assistant that it has changed. Home Assistant can only poll it for changes. I’ve noticed that hitting the switch takes about 10 seconds for the lights to come on. I increased the polling rate and now I can get it to turn on in 1-2 seconds, but it’s just a stupid solution.
Any ideas for fixing this? I’m thinking that an MQTT switch could do the job, just not sure what is good to buy. I like Kasa’s hardware, it feels very solid while being affordable. But the software is dumb. I want full LAN control with events, not polling.
Thanks for your help!
Right, the problem is that the kasa local API needs to be polled for state changes. Belkin wemo switches are similar in feel and they have a better local API - they send immediate state change event notifications (I can speak to whether the HA plugin uses them). The cheaper switches that can be flashed with Tasmota or similar could notify immediately over MQTT but their feel isn’t as solid.
You could try a cloud based integration just for this switch, but 1-2s is probably as fast as you’d get.
OTOH if you can live with 1-2s, it’s not really a bad solution - that polling rate isn’t going to do any harm to your network (though I agree it’s a stupid API).
Thanks friend!