Notifications on yolink speaker come twice

I already had yolink sensors for my freezers, so when I started checking out Home Assistant I got a couple of their motion sensors and their ‘speaker hub’.

I setup the sensors and speaker in Home Assistant and setup a couple of alerts (“activity in driveway” etc). Since then each time someone comes up the drive, it does the alert, and then maybe 60 seconds later it does it again.

I’m assuming that the ‘no motion’ state of the sensor a minute later is what’s triggering that (as they coincide) but I’m not sure what to do to eliminate them (that won’t break what I’ve already got) so I thought I’d ask…

Any thoughts or input are appreciated!

Please follow Community Questions Guideline #9 by posting the, properly formatted, YAML configuration for the automation. This can be found by clicking the breadcrumb menu (3 dots) at the top right in the Automation Editor and selecting “Edit in YAML”. Copy that and paste it, using 3-ticks ``` on the line above and the line below the configuration code.

Is the detection being processed by more than one integration?

  • Go to Settings / Automations and Scenes
  • Pick the Automation
  • Pick Traces in the upper right
  • Then pick Trace Timeline use the date/time control at the top to look at when it was executed

What did you find?

Here it is. Thanks!

alias: Motion in Driveway
description: “”
triggers:

  • trigger: state
    entity_id:
    • binary_sensor.driveway_motion_sensor_motion
      for:
      hours: 0
      minutes: 0
      seconds: 1
      conditions:
      actions:
  • action: yolink.play_on_speaker_hub
    metadata: {}
    data:
    tone: tip
    volume: 8
    target_device: 4b63086581f4d0cec6c14cdd35f6b169
    message: Motion Detected in driveway
    mode: single

That’s not properly formatted… :smile:

I agreed, that’s probably what’s happening.

You need to set a value for the to configuration variable in your trigger.

triggers:
  - trigger: state
    entity_id: binary_sensor.driveway_motion_sensor_motion
    to: 'on'
    for:
      hours: 0
      minutes: 0
      seconds: 1

Figured it out!

I’d set it on detection, but looking at the other options, it had a place to specify the change from and to, so I set it from clear to detected and that fixed it.

It seems as I suspected it was redetecting the change in state when it went from ‘detected to clear’.

Thanks for all the input it got me looking in the right direction!