I don’t know if is possible or not.
I have this addon to make Phone calls from HA to my mobile: https://github.com/sdesalve/hassio-addons/tree/master/dss_voip.
I have this automation:
- id: '1575543714490'
alias: ProvaScripttelefono
description: ''
trigger: []
condition: []
action:
- data:
entity_id: script.02notifica_telefonata
variables:
message: "Attenzione! Attenzione!!! ALLARME ATTIVATO!! Sensori Attivi:
{% for state in states.binary_sensor -%}
{% if state.state == 'on' and state.name not in ['Router Antenna Studio', 'Router Studio'] %}
{{ state.name }}
{%- endif -%}
{%- endfor -%}"
service: script.turn_on
but when the automation pass the variable to the script this is the result:
[Info] Received messages {"call_sip_uri": "sip:[email protected]", "message_tts": "Attenzione!!! ALLARME ATTIVATO!! Sensori Attivi: {% for state in states.binary_sensor -%} {% if state.state == 'on' and state.name not in ['Router Antenna Studio', 'Router Studio'] %} {{ state.name }} {%- endif -%} {%- endfor -%}"}
Converting audio file 'https://xxxxxx.org/api/tts_proxy/xxxxxxxx_it_-_google_translate.mp3'...
Audio succesfully converted...
Starting SIP Client and calling 'sip:[email protected]'...
Someone have some idea?