Camera motion state use as trigger

I have already imported cameras from synology surveillance station and enabled motion_detection: true
But trigger not working. Do you have idea?

alias: sarunas-room-state
description: ""
  - platform: state
      - camera.synology_sarunas_room
    attribute: motion_detection
condition: []
  - type: turn_on
    device_id: <device id>
    entity_id: switch.sarunasroom_switch_1
    domain: switch
mode: single

I use similar setup, but what I do is on Synology side create webhook call to HA when there is motion detected.

This should be instant update too. And I use that in my automation (that webhook).

Great! Could you tell me how to do that (step by step)?

How to create webhook in HA?
And did you create action rule in synology home page or surveillance page?

1 Like

Hi @BeardedConti
I found how to trigger through webhook and it works, thank you, but one problem:
When lights turns off camera detect it as motion and turn lights again and looping turn on, turn off, turn on, turn off, maybe some one has a solution for that?

That’s awesome stuff.
Thank you - it’s really helpful!

Could you please share the solution? I’m looking for the same method

One option would be:
If the automation is triggered by the webhook again, just check, if the “Motion state” changed recently.
And proceed only if it did not:
Means: If your light is on for 3 minutes and motion is triggered after these three minutes (caused by changing lights), just ignore this with:

condition: state
entity_id: sensor.motion_sensor
state: "off"
  hours: 0
  minutes: 3
  seconds: 10

could you please share a step by step ?
too much info out there…

But in that case, we’re not going to leave the light on if I move around the yard, are we?

@loveHomeAssistkevin , @riko
You need to create action rule in synology which sends webhook to the HA:

and create HA automation:

No, you are right - that’s an issue unless is acceptable.
I you are not doing excersises in the yard, a tim of 5 min would cover 95% of your use cases.

But basically my suggestion above is just a workaround and does not cover all use cases.