I have been creating quite a few custom responses lately, and I’m trying to fine tune the code that I canc opy and paste to new responses.
In the example below (just like all the others I’ve created so far), I’m using the same quoted text for both the text: line, and the message: line. But isn’t there a small piece of code I can put in the message: line, that will use the same data entered on the text: line? Would make copying code from the action: line onwards a breeze to other custom responses
# Solar & EV
intent_script:
Battery:
speech:
text: "The house battery has a charge of {{states('sensor.battery_state_of_capacity') | round(0)}} percent"
action:
service: "tts.google_translate_say"
data:
message: "The house battery has a charge of {{states('sensor.battery_state_of_capacity') | round(0)}} percent"
target:
entity_id: >
{{ states('sensor.choose_speaker_cmd') }}