input_text:
text_tts:
name: text_tts
initial: 输入朗读
text_asr:
name: text_asr
initial: 输入命令
automation:
- alias: 'rokid_text_tts'
initial_state: on
trigger:
- platform: state
entity_id: input_text.text_tts
action:
- service: rokid_tts.speak
data_template:
message: '{{states.input_text.text_tts.state}}'
- alias: 'rokid_text_asr'
initial_state: on
trigger:
- platform: state
entity_id: input_text.text_asr
action:
- service: rokid_asr.speak
data_template:
message: '{{states.input_text.text_asr.state}}'
|