Hello,
I am trying to send this notification to the mobile app via an automation:
service: notify.mobile_app_oneplus_5
data:
title: Batterie Faible
message: >
{% set sensors = "Batterie google port" %}
{%if sensors | regex_search(find=',') %}
{{sensors | replace("Batterie ","") }} ont leurs niveaux de batterie faible (<10%)
{%else%}
{{sensors | replace("Batterie ","")}} a son niveau de batterie faible (<10%)
{%endif%}
However, it contains the special character “<” that simply cuts the message after the opened bracket:
sensor_name a son niveau de batterie faible (
instead of the expected:
sensor_name a son niveau de batterie faible (<10%)
I tried to escape the character with \<
or {{"<"}}
but it does not work.
However, the same message is sent without a problem if I use the persistent notification service.
Anyone could help me ?
thanks !