Weather
Weather 集成从网络服务获取气象信息,并显示给定位置的天气状况及其他详细信息。
This weather is a building block integration that cannot be added to Home Assistant directly, but is used and provided by other integrations. A building block integration differs from a typical integration that connects to a device or service. Instead, other integrations use this weather building block to provide entities, actions, and other functionality that you can use in your automations or dashboards. If one of your integrations uses this building block, this page documents the functionality the weather building block offers.
如需查看天气类集成列表,请在集成页面中选择天气分类。
请阅读您所使用天气服务提供商的集成文档,了解如何进行设置。
Home Assistant 当前支持多个免费网络服务,其中部分服务需要注册。
状态和状态属性
天气实体的状态用于表示当前整体天气状况,例如 cloudy 或 sunny。
天气状况映射
weather 实体可使用以下状态值:
- Clear, night:夜间天空晴朗。
clear-night - Cloudy:天空多云。
cloudy - Fog:有浓雾,能见度降低。
fog - Hail:正在下冰雹。
hail - Lightning:有闪电或雷暴。
lightning - Lightning, rainy:有闪电或雷暴,同时伴随降雨。
lightning-rainy - Partly cloudy:天空局部多云。
partlycloudy - Pouring:正在下大雨。
pouring - Rainy:正在下雨。
rainy - Snowy:正在下雪。
snowy - Snowy, rainy:雨雪同时发生。
snowy-rainy - Sunny:天空晴朗,阳光充足。
sunny - Windy:风很大。
windy - Windy, cloudy:有风且多云。
windy-variant - Exceptional:出现异常天气状况。
exceptional
状态属性
详细天气状况以及对应使用的计量单位会通过状态属性显示。天气实体不一定支持所有状态属性。
操作 weather.get_forecasts
此操作会填充 response data,返回天气服务及其对应预报的映射。
响应数据字段是一个调用目标实体的映射,每个实体都包含 forecast 字段。
forecast 是给定时间点的天气预报列表:

