Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 99027

Automation condition template - how to set up?

$
0
0

@repjas wrote:

Hi there,

I’m trying to configure an automation for my Netatmo Welcome indoor camera. The trigger and action work: it sends me a notification with the name of the known face detected. However, now I want to only send a notification if the name is ‘John’. This is where I struggle as I cannot get the condition to work. It’s probably easy, but I just started with HA and am completely new to coding.

Many thanks for the help!

  alias: Test Netatmo welcome
  description: ''
  trigger:
  - event_data:
      type: person
    event_type: netatmo_event
    platform: event
  condition:
    data_template: >
    {% if trigger.event.data["data"]["name"] == john %}
      True
    {% else %}
      False
    {% endif %}
  action:
  - data_template: >
      message: {{ trigger.event.data["data"]["name"] }}
      title: Netatmo event
    service: notify.mobile_app_oneplus_a3003

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 99027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>