- id: '13283'
alias: Check-in_abc_spot
description: Check-in when I goto spot
trigger:
- entity_id: person.abc
event: enter
platform: zone
zone: zone.spot_abc
condition: []
action:
- delay: 00:03:00
- condition: template
value_template: '{{ is_state( trigger.entity_id, trigger.to_state }}'
- data_template:
message: arrived at {{ state_attr(trigger.zone, 'friendly_name') }}
title: Check-in done.
service: notify.notify
Error on developer-tools/logs
Logger: homeassistant.helpers.condition
Error during template condition: UndefinedError: 'trigger' is undefined
Can not use trigger templating in condition??
I want to check-in notify 3min after arrived because GPS is unstable when person go indoors.
How can it be solved??
I live in Japan.
There are many apartment houses in Japan. Therefore, if I set a wide zone for home or spot, false positives will increase.
As you know, the position information of GPS is shifted when it is indoors.
Therefore, I want to avoid unnecessary notifications by checking if the state has not changed even three minutes after the trigger.
With the method suggested by you, state_attr (trigger.zone, ‘friendly_name’) will result in an error, so I would like to use a zone trigger.
Is it a problem of the specification, not a mistake of the setting?
I want to use HA in Japanese language.
When trying to use HA in a Japanese language, it is often necessary to use a friendly name instead of a zone name.
Is it sure to make an issue in github?
I want to be able to specify multiple zones in zone: with zone trigger.
And I want to use the trigger object even in the condition in the action.
Thank you very much.
Because I want to notifying twelve spots.
And I am trying to create multiple Automations for different zones with the same content.
I just want to be able to specify multiple to zone: of zone trigger.