New whatsapp integration for Home Assistant

Hi, you need create an automation, triggered by camera motion detection, then perform 2 actions: 1) take a snapshot from camera and store under selected location, 2) send message using the API with screenshot within data, please refer to below automation YAML

alias: WhatsApp alert on entrance person detection
description: WhatsApp alert on entrance person detection
trigger:

  • platform: state
    entity_id:
    • <binary_sensor.YOUR_CAMERA_MOVEMENT_SENSOR>
      to: “on”
      condition:
      action:
  • service: camera.snapshot
    metadata: {}
    data:
    filename: /media/snapshots/entrance/last_snapshot.jpg
    target:
    entity_id: camera.cameraentrance_sub
  • service: notify.greenapi
    data:
    message: Person detected on entrance
    target: <YOUR GROUP/PERSON ID>
    data:
    file: /media/snapshots/entrance/last_snapshot.jpg
    mode: single