本帖最后由 debitus 于 2018-5-19 11:31 编辑
楼主你好,我现在遇到一个问题,就是tts的语音会陷入不停的循环。请问你有遇到吗?
相关代码如下:
action:
- service: notify.ios_ray
data:
title: "Bad Weather"
message: "天气不好,请关窗户"
- service: media_player.sonos_snapshot
- service: media_player.volume_set
entity_id: media_player.livingroom
data_template:
volume_level: >
{% if now().hour > 22 %}
0
{% elif now().hour < 9 %}
0
{% else %}
0.25
{% endif %}
- service: tts.clear_cache
- service: tts.baidu_say
data_template:
entity_id: media_player.livingroom
message: >
"天气不好,请关窗户!"
cache: false
- service: automation.turn_on
entity_id: automation.restore_livingroom
- alias: Restore_livingroom
initial_state: 'off'
trigger:
- platform: state
entity_id: media_player.livingroom
from: 'playing'
to: 'paused'
action:
- delay: 00:00:01
- service: media_player.sonos_restore
- service: automation.turn_off
entity_id: automation.restore_livingroom
|