Long delay after trigger before action is complete (switch/plugs)

Newb here…I just starting playing with Home Assistant today.

Home Assistant: Latest version on Raspberry Pi 3 B+
Switch: Kasa HS200
Plugs: Kasa HS100
Tuya
Tuya

Automation: When I manually toggle the lightswitch, all three plugs should turn on/off respectively.

Problem: There is a 27 second on delay and a 16 second off delay.

All these devices work almost instantly using Alexa voice control from an Echo Dot. I wanted to add a manual feature so you don’t have to verbally say a command.

I have all the lights as a group.

group:
  Bedroom Lights:
   name: Lights
   entities:
 - switch.stevens_smart_plug
 - switch.002009475ccf7fe01cd0
 - switch.002009475ccf7fdf5c72

Here’s how I’m accomplishing it.

Manual-ON
Trigger type: State
Entity: switch.bedroom_light
From: off
To: on

Action Type: Call Service
Service: homeassistant.turn_on
Service data: { “entity_id”: “group.bedroom_lights” }

Manual-OFF
Trigger type: State
Entity: switch.bedroom_light
From: on
To: off

Action Type: Call Service
Service: homeassistant.turn_off
Service data: { “entity_id”: “group.bedroom_lights” }

Any idea what could be causing this?

Also, when I toggle the lights in the web browser using Home Assistant, they respond immediately.

I am not sure what is causing your issue, but you can use the Alexa Media Player to trigger Alexa routines too.

Thanks for that info. I’d like to get Alexa and everything running through Home Assistant eventually.

For now I’m going to keep her where she’s at. Once I figure out what’s causing this delay, I’ll move her over.

1 Like

I have my eye on group operations, somehow in some of my cases, operating on group entities can take extra delay. Try testing the same trigger/action but with individual entities of the group instead of the group.

It appears you are going through the tuya cloud/network on your switches. That network does occasionally lag noticeably. Most of the time my tuya type switches will lag a couple of seconds but I have experienced a 10-15 second lag… albeit rarely.

With Alexa Media Player I only control an Amazon Plug so it only uses one cloud network.

What other brands are cost effective and reliable?

think z-wave stuff… it ain’t cheap though

1 Like