Weather — weather v1
Conditions outside, and what they are about to be.
A proxy rather than a special case, and that is the whole point of it. An enormous share of the automation people actually want is conditioned on the weather — close the blinds on a hot afternoon, warm the house before a cold morning, do not water the garden when it is about to rain — and every one of those needs the outside world to be something a rule can test.
Made ordinary, it composes with everything already built: a Trigger::State fires on it, a
Condition::State qualifies on it, the miner correlates against it, the reviewer sees it in the
house digest, and the assistant can answer "is it going to be cold tonight" through the same tool
surface it uses for a lamp. Made a special case, every one of those would need its own plumbing.
One binding per location — normally just the house. A driver fills this from wherever it likes: a public forecast API, a hardware station on the roof, a neighbour's feed. Core does not care, which is the same bargain every other proxy makes.
forecast_* is the part worth having. Reacting to weather that has already arrived is a thermostat;
acting on weather that is coming is the difference between a house that copes and a house that was
ready.
Capabilities
Declared in the driver manifest under [[proxy]] capabilities. Anything not declared takes the default below.
| Capability | Type | Default | Meaning |
|---|---|---|---|
forecast_hours | u32 | 0 | How far ahead the forecast reaches |
has_air_quality | bool | false | |
has_forecast | bool | false | Reports what is coming, not only what is |
has_rain | bool | false | Reports precipitation |
has_uv | bool | false | Reports a UV index |
has_wind | bool | false | Reports wind speed |
Notifications
air_quality_changed
Only present when
has_air_qualityis declared true.
| Parameter | Type | Notes |
|---|---|---|
aqi | u32 | Whatever index the source publishes; compare against itself |
conditions_changed
What it is like outside now.
| Parameter | Type | Notes |
|---|---|---|
condition | one of clear · cloudy · overcast · fog · rain · snow · sleet · hail · storm (optional) | |
humidity | f32 0–100 (optional) | |
temperature_c | f32 (optional) |
forecast_changed
Only present when
has_forecastis declared true.
What is coming. Deliberately coarse — a low, a high, and a one-word outlook — because a rule that depends on a forecast being right to the degree is a rule that will be wrong.
| Parameter | Type | Notes |
|---|---|---|
forecast_condition | one of clear · cloudy · overcast · fog · rain · snow · sleet · hail · storm (optional) | |
forecast_high_c | f32 (optional) | |
forecast_low_c | f32 (optional) | |
forecast_rain_chance | u8 0–100 (optional) |
online_changed
| Parameter | Type | Notes |
|---|---|---|
online | bool |
rain_changed
Only present when
has_rainis declared true.
| Parameter | Type | Notes |
|---|---|---|
rain_mm_hour | f32 (optional) | |
raining | bool |
uv_changed
Only present when
has_uvis declared true.
| Parameter | Type | Notes |
|---|---|---|
uv_index | f32 0–20 |
wind_changed
Only present when
has_windis declared true.
| Parameter | Type | Notes |
|---|---|---|
wind_kph | f32 |
State
Last-known values core keeps for a binding of this proxy.
| Key | Type | Meaning |
|---|---|---|
aqi | u32 | |
condition | string | |
forecast_condition | string | |
forecast_high_c | f32 | |
forecast_low_c | f32 | |
forecast_rain_chance | u8 | |
humidity | f32 | |
online | bool | |
rain_mm_hour | f32 | |
raining | bool | |
temperature_c | f32 | |
uv_index | f32 | |
wind_kph | f32 |