Hello,
I have an automatisation, which detect if one of my solar panel produce not enough.
I want to trigger a notification of all devices linked my Home Assistant.
I would like to loop over mobil apps automatically, to be robust in case I buy a new phone. I would like to make a notificaiton which will trigger on the new phone with no further Home Assistant config.
Here is the ACTION part in the YAML of my automatisation (sorry for french wording in notif):
actions:
- sequence:
- action: notify.mobile_app_ot5
data:
title: Alerte Panneaux Solaires Déféctueux
message: >-
Un des panneaux solaires a produit plus de 20% de moins que la
moyenne des autres panneaux. VĂ©rifier les panneaux solaires.
- action: notify.mobile_app_sm_a536b
data:
title: Alerte Panneaux Solaires Déféctueux
message: >-
Un des panneaux solaires a produit plus de 20% de moins que la
moyenne des autres panneaux. VĂ©rifier les panneaux solaires.
- action: notify.mobile_app_sm_a336b
data:
title: Alerte Panneaux Solaires Déféctueux
message: >-
Un des panneaux solaires a produit plus de 20% de moins que la
moyenne des autres panneaux. VĂ©rifier les panneaux solaires.
It’s working but mobile apps are listed “manually”.
I tried several things. My last try is this one. I don’t understand how to make it working…
actions:
- sequence: "{% for item in integration_entities('mobile_app') | select('match','device_tracker') | expand | map(attribute='name') | map('slugify') | list %}
- action: notify.mobile_app_sm_a336b
data:
title: Alerte Panneaux Solaires Déféctueux
message: >-
Un des panneaux solaires a produit plus de 20% de moins que la
moyenne des autres panneaux. VĂ©rifier les panneaux solaires.{% endfor %}"
I’m on Home Assistant since 3 days so totally New.
If someone could help me, to find out a working code, it would be great !