Hello everyone.
Today i update home assistant to 98.5 version and it broke some automations with presence notification.
I think it happend because of huge update of device_tracker/mikrotik_tracker. Here is my old config:
device_tracker:
- platform: mikrotik
host: 192.168.***.***
username: *******
password: *******
interval_seconds: 300
consider_home: 600
track_new_devices: false
And my new config:
mikrotik:
- host: 192.168.***.***
username: *******
password: *******
method: capsman
track_devices: true
Now, the problem is with one automation:
- id: '********************'
alias: Presence notifier
trigger:
- entity_id:
- device_tracker.renga
- device_tracker.lesya
platform: state
action:
- data_template:
message: "{% if trigger.entity_id == \"device_tracker.renga\" %}\n {% set person\
\ = \"Renga\" %}\n{% elif trigger.entity_id == \"device_tracker.lesya\" %}\n\
\ {% set person = \"Lesya\" %}\n{% endif %} {% if trigger.to_state.state == 'home' %}\n {{
person}} arrived\n{% else %}\n {{ person }} leaving\n{% endif %}\n"
title: Presence {{ as_timestamp(now()) | timestamp_custom("%d-%m-%Y, %H:%M:%S",
True) }}
service: notify.ios_renga
With the new mikrotik tracker i recieve a lot of messages, with 13 seconds intervals. This is because tracker updates entity attributes, like uptime, signal, etc. So i changed my automation a little:
{% if trigger.from_state.state == 'not_home' and trigger.to_state.state == 'home' %}\n {{ person }}\
\ arrived\n{% elif trigger.from_state.state == 'home' and trigger.to_state.state == 'not_home' %}\n {{ person }} leaving\n {% endif %}\n
Now it’s okay with messages, but i have a huge amount of errors in log file:
2019-09-11 13:38:20 ERROR (SyncWorker_11) [homeassistant.components.ios.notify] No message parameter was found in the notification payload.
Can enyone help me with that problem?