Below is my full YAML automation code and it’s not working. On clicking send button it gives the message on phone but says only, “Null”. I do not understand what I may be doing wrong.
alias: Voice Message to Myname
description: ""
trigger:
- platform: state
entity_id:
- input_button.voice_send_myname
condition: []
action:
- service: notify.mobile_app_note20
data:
message: TTS
data:
tts_text: >-
{{state_attr('input_text.voice_message_myname','send_voice_message_to_myname')
}}
media_stream: alarm_stream
mode: single