- 积分
- 475
- 金钱
- 386
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
- 积分
- 475
- 金钱
- 386
- HASS币
- 0
|
发表于 2023-8-14 09:02:03
|
显示全部楼层
请教大佬我的配置如下不能实现自动播报天气怎么回事呢:
# 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播报
|
|