Hi all,
This is my first blueprint which set a MQTT device tracker to home
when a person have been seen seen by a Netatmo Indoor camera and then will reset the state to not_home
after a chosen delay
netatmo_welcome_2_device_tracker.yaml
blueprint:
name: "[Neatmo Welcome] Known person detected to device tracker"
description: Set a device tracker to 'home' when a known person is seen
domain: automation
input:
person_name:
name: Person name
description: Name of the person seen by Netatmo Welcome to consider home
device_tracker_state_topic:
name: MQTT Device tracker topic
description: MQTT Device tracker state topic to set home/not_home
payload_home:
name: Payload home
description: The payload value that represents the `home` state for the device.
default: home
payload_not_home:
name: Payload not home
description: The payload value that represents the `not_home` state for the device.
default: not_home
time_home_hour:
name: Reset timer (hour)
description: Hours to wait before considering the person as `not_home`
default: 1
selector:
number:
min: 0
max: 24
time_home_min:
name: Reset timer (min)
description: Minutes to wait before considering the person as `not_home` (Will be added to `Reset timer (hour)`)
default: 0
selector:
number:
min: 0
max: 60
trigger:
- platform: event
event_type: netatmo_event
event_data:
type: person
data:
name: !input person_name
condition: []
action:
- service: mqtt.publish
data:
topic: !input device_tracker_state_topic
payload: !input payload_home
- delay:
hours: !input time_home_hour
minutes: !input time_home_min
seconds: 0
milliseconds: 0
- service: mqtt.publish
data:
topic: !input device_tracker_state_topic
payload: !input payload_not_home
mode: restart