Skip to main content

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.

CapabilityTypeDefaultMeaning
forecast_hoursu320How far ahead the forecast reaches
has_air_qualityboolfalse
has_forecastboolfalseReports what is coming, not only what is
has_rainboolfalseReports precipitation
has_uvboolfalseReports a UV index
has_windboolfalseReports wind speed

Notifications

air_quality_changed

Only present when has_air_quality is declared true.

ParameterTypeNotes
aqiu32Whatever index the source publishes; compare against itself

conditions_changed

What it is like outside now.

ParameterTypeNotes
conditionone of clear · cloudy · overcast · fog · rain · snow · sleet · hail · storm (optional)
humidityf32 0–100 (optional)
temperature_cf32 (optional)

forecast_changed

Only present when has_forecast is 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.

ParameterTypeNotes
forecast_conditionone of clear · cloudy · overcast · fog · rain · snow · sleet · hail · storm (optional)
forecast_high_cf32 (optional)
forecast_low_cf32 (optional)
forecast_rain_chanceu8 0–100 (optional)

online_changed

ParameterTypeNotes
onlinebool

rain_changed

Only present when has_rain is declared true.

ParameterTypeNotes
rain_mm_hourf32 (optional)
rainingbool

uv_changed

Only present when has_uv is declared true.

ParameterTypeNotes
uv_indexf32 0–20

wind_changed

Only present when has_wind is declared true.

ParameterTypeNotes
wind_kphf32

State

Last-known values core keeps for a binding of this proxy.

KeyTypeMeaning
aqiu32
conditionstring
forecast_conditionstring
forecast_high_cf32
forecast_low_cf32
forecast_rain_chanceu8
humidityf32
onlinebool
rain_mm_hourf32
rainingbool
temperature_cf32
uv_indexf32
wind_kphf32