Light doesn't go on immediately when sensor activates

Hi Everyone
I installed HA about a month ago and i’m loving how useful it is.
The issue i have is with a simple light to switch on with motion.
I’m using the default option in HA to do this.
The problem is the light doesn’t turn on for about 5 seconds after motion is detected.
I have noticed on the Tuya sensor when motion is detected a red light is on the device and only when this goes out does the light switch on.
I have an Aqara sensor in another room and this works perfectly.

Is this Tuya sensor just bad or is there any setting i can change to speed up the lighting process.
Big thanks

Show the automation yaml file. If it’s set to trigger on motion detected from on to off, this this is is what I would expect.

1 Like

The Yaml file is below
alias: Landing Test
description: “”
use_blueprint:
path: homeassistant/motion_light.yaml
input:
motion_entity: binary_sensor.motion_sensor_kitchen_motion
light_target:
device_id: 80ed22abceb31ba0d9570e2730ca2826

Post it using code tags. The forum editor doesn’t pass indentation correctly, and this is critical to yaml.

I did look at the blueprint (I don’t use this one) and the trigger is off to on.
Next, I would go to developers tools → states and watch the state of the motion entity while someone walks into the view of the sensor. Verify that the LED on the sensor matches the entity state.

1 Like


That reminds me of Muhammad Ali.

1 Like

lol Its the turning on is slow not the turning off. Love that quote though.

If i click the run actions button in States the light goes on instantly but i can’t see details for the motion sensor. I’m probably looking at the wrong thing.

???
There are no buttons in states.

You go to the developers tools → states, then find the sensor entity.

It’s a Tuya Device, so the signal likely goes to China servers and back before it does the thing…

Cloud Polling…

2 Likes

Found it in the end. About a 3 to 4 second delay from when the LED lights to showing its detected in the State. Cloud Polling a possibilty as Sir_Goodenough mentions above.

Good catch. I flashed ESPHome to my few Tuya devices, so I never see the cloud. Since Tuya also sometimes uses the Bekin chip, LocalTuya is a viable option for the OP.

A better option is to never buy Tuya devices.

1 Like

Thanks for the info, I will try and get Local Tuya up and running and going forward i will avoid all Tuya devices.

You still need a Tuya app on your phone to get the API key, but after that you can delete the Tuya app.

It will be difficult to completely avoid Tuya because they license their tech to other brands.

1 Like

I take it Smart Life is a Tuya app so i can get the api Key there?

You can find the instructions here.

1 Like

That link should have been:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

1 Like

I got Local Tuya installed and went through the vast procedures to get an API key. Unfortunately i can seem to get any devices installed even though 4 are detected.
Its giving a datapoint error. Anyway getting late here in Ireland so will check back tomorrow when i’m fresh and try again.

I got Local Tuya and also Tuya Local working but the sensor doesn’t seem to be supported. I managed to get a switch and a few light bulbs working so at least they should work faster not relying on the cloud.