| 
积分475金钱386 威望0 贡献0 HASS币0  
 中级会员 
 
 
	积分475金钱386 HASS币0  
 | 
 
 发表于 2023-8-14 08:57:53
|
显示全部楼层 
| 求教大佬我的配置如下不能自动播报: 
 
 
 
 # Weather predicti
 sensor:
 - platform: weather_report
 name: weather-report
 forecast: 24           #未来24小时天气,可有手工按需修改
 monitored_conditions:
 - temperature        #温度
 - precipitation      #雨量
 - windSpeed          #风速
 - pressure           #气压
 - windDirection      #风向
 - humidity           #湿度
 
 # Text-to-speech (TTS): Say a TTS message with edge_tts
 
 tts:
 - platform: tts.xiaomo_say
 #speed:语速0-9(缺省5)
 #pitch:语调0-9(缺省5)
 #volume:音量0-15(缺省5)
 #person:声音(0:女,1:男 )
 speed: 5
 pitch: 5
 volume: 15
 person: 0
 
 - alias:  weather-report
 initial_state: true
 trigger:
 - platform: time
 hours: 7
 minutes: 45
 seconds: 0
 
 condition:
 condition: numeric_state
 entity_id: sensor.weather_temperature
 above: 0  #判断气温是否高于0°C
 
 action:
 - service: tts.xiaomo_say
 data_template:
 entity_id:  media_player.e2eb0ba8_f1e28222
 message: "现在播报天气信息。天气{{states('weather.tian_qi')}}, 实时温度{{states('sensor.shi_shi_wen_du')}}°C, 实时湿度{{states('sensor.shi_shi_shi_du')}},实时风速{{states('sensor.shi_shi_feng_su')}},天气预报{{states('sensor.tian_qi_yu_bao')}},实时空气质量{{states('sensor.shi_shi_kong_qi_zhi_liang')}}"
 
 media_player :
 - platform: ipad播报
 name: ipad播报
 
 
 | 
 |