I want to send notifications to my phone and to my notebook when it is online. If I manually set target to ["oneplus","notebook"]
notification works, but if I use target template I have error in log:
17-04-20 09:59:07 ERROR (Thread-5) [homeassistant.components.notify.html5] ["oneplus","notebook"] is not a valid HTML5 push notification target!
My automation:
- alias: 'Notification Update Available'
trigger:
platform: state
entity_id: updater.updater
action:
service: notify.html5
data_template:
title: 'Nowa wersja Home Assistante'
message: "Dostępna jest aktualizacja do wersji {{ states.updater.updater..state }} dla Home Assistant."
target: >-
{% if states.device_tracker.notebook.state == 'home' %}
["oneplus","notebook"]
{% else %}
oneplus
{% endif %}
data:
data:
tag: 'notification-hass-update'
url: "https://home-assistant.io/blog/"
What I’m doing wrong?