Blink and Tuya automation

Hi all,

Absolute beginner with Home Assistant, having got a Pi for Christmas and thought I would give this a go. I managed to install HomeAssistant as a docker container after following some online tutorials.

I have a Blink doorbell with a SyncModule 2 and a couple of smart lightbulbs on my SmartLife app. I was able to add all these devices to HA and can control them through the dashboard. However, when I tried to create an automation to turn on the front porch lights automatically when motion is detected on the doorbell, I just cannot get it to behave as I would expect.

id: '1707'
alias: 'Lights: Doorbell detects motion'
description: Front porch lights on when motion detected
trigger:
  - type: motion
    platform: device
    device_id: 6de06
    entity_id: 11c62
    domain: binary_sensor
condition: []
action:
  - service: light.turn_on
    metadata: {}
    data: {}
    target:
      device_id:
        - e90cc
        - 9e514
  - delay:
      hours: 0
      minutes: 0
      seconds: 45
      milliseconds: 0
  - service: light.turn_off
    metadata: {}
    data: {}
    target:
      device_id:
        - e90cc
        - 9e514
mode: single

The lights should turn off if the doorbell detects motion, then lights would turn off after 45 secs. However, when the motion is detected by the doorbell, the lights do not seem to respond at all, even though the Traces of the automation seem to suggest that it was triggered and ran correctly.

image

I can get the same automation to work fine using Alexa routines. Can anyone please help? It seems such a simple automation that should work even for beginners.

Try use State instead of Device. In Create Automation → Select → Entity then Select → State. Start from there. There also a motion activated light blueprint you can start with also.

1 Like

Hi Rodrick,
Thanks for this! This seems to have worked but there was quite a delay in triggering the lights to go on. Not sure why that would be.

Could you explain why the platform: device wouldn’t work but the state would?

Thanks for taking the time to reply.

L

States are current representation of the Entity, devices update the current state to HA making it more reliable.

For the delay, for me this is common with Blink even when using Alexa alone. You can improve it by giving the blink device a stronger wifi signal, put the API is slow in general.

Thanks again!

1 Like