plot_air_quality_history
Generate historical air quality charts from air-Q sensors. Select a sensor, time range, and output format to visualize trends for a device, location, or group.
Instructions
Generate a chart of historical air-Q sensor data.
WHEN TO USE THIS TOOL: Call this whenever the user asks to see a graph,
chart, plot, or visual representation of historical sensor data.
Selector:
- `device` — one specific device
- `location` — all devices at one location
- `group` — all devices in one group
- if none is specified, all configured devices are plotted together
OUTPUT FORMAT:
- "png" (default) — one inline image containing all selected devices
- "webp" — inline image with smaller payload size
- "svg" — vector graphic as downloadable MCP resource
- "html" — self-contained interactive HTML as downloadable MCP resource
REQUIRED:
- sensor: the sensor key to visualise (one sensor per chart)
TIME RANGE:
- `last_hours` or `from_datetime` / `to_datetime`
- `timezone_name` controls how timestamps are rendered on the X axis and
how naive input datetimes are interpreted
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sensor | Yes | ||
| device | No | ||
| location | No | ||
| group | No | ||
| last_hours | No | ||
| from_datetime | No | ||
| to_datetime | No | ||
| title | No | ||
| x_axis_title | No | ||
| y_axis_title | No | ||
| chart_type | No | area | |
| dark | No | ||
| output_format | No | png | |
| max_points | No | ||
| timezone_name | No |