Trigger netatmot presence / smartthings

hi at all.

I am very new at homeassistant.
Homeassistant is running well, I got my two netatmo presence cameras working, so they are integrated.
I have also integrated smartthings.

What I want to do: Using one of my two netatmo cameras to detecting persons and switch on a light switch by smartthings.

How does it work?
Where to enter the code, at automations.yaml ?

I found this:

- alias: Motion at home
  description: 'Motion detected at home'
  trigger:
  - event_type: netatmo_event
    platform: event
    event_data:
      type: human # other possible types: animal, vehicle
  action:
  - data_template:
      message: >
        {{ trigger.event.data["data"]["message"] }}
        at {{ trigger.event.data["data"]["home_name"] }}
      title: Netatmo event
    service: persistent_notification.create

How to select one of two cameras?
How to perform an action with smartthings?

Hope u can help me. thx

Yes, that belongs under automation: in your configuration.

You can try something like this:

- alias: Motion at home
  description: 'Motion detected at home'
  trigger:
  - event_type: netatmo_event
    platform: event
    event_data:
      type: human # other possible types: animal, vehicle
  condition:
    - condition: template
      value_template: "{{ trigger.event.data['data']['camera_id'] == 'ab:cd:12:34:56:ef' }}"
  action:
  - service: light.turn_on
    data:
      entity_id:
        - light.your_smartthing_light

You have to put in your actual camera id and the light entity you want to control.

1 Like

thx, I got it. Works perfect.

1 Like