Blueprints & Statistics
Two importers. import_blueprint pulls an automation or script blueprint straight from a community-forum topic, GitHub file, or Gist. Tell Claude “set up that blueprint” with a link and it can import and configure it in one conversation.
import_statistics writes long-term statistics rows directly: repair a broken energy dashboard, migrate meter history from a previous system, or feed external data (solar forecasts, utility bills) into HA’s statistics store. brAIn reads long-term statistics for its energy analysis, so backfilled history makes those insights smarter too.
Import blueprint
brain.import_blueprint
Import an automation or script blueprint from a URL (Home Assistant community forum, GitHub, or GitHub Gist). Returns the blueprint domain, name, and file path as response data.
| Field | Type | Required | Description |
|---|---|---|---|
url | text | yes | The URL to import the blueprint from. |
service: brain.import_blueprintdata: url: https://community.home-assistant.io/t/motion-activated-light/123456🗣️ “Import that motion-activated-light blueprint from the forum and set it up for the hallway.”
Import statistics
brain.import_statistics
Import or backfill long-term statistics rows. Use an entity ID (sensor.gas_meter) for recorder statistics, or an external ID (bruh:solar_forecast) for external statistics; the source is derived automatically.
| Field | Type | Required | Description |
|---|---|---|---|
statistic_id | text | yes | Entity ID (sensor.gas_meter) or external ID (domain:object_id). |
has_mean | boolean | yes | Whether the rows carry mean/min/max values (measurements). |
has_sum | boolean | yes | Whether the rows carry sum values (metered totals like energy). |
name | text | no | Display name for the statistic. |
unit_of_measurement | text | no | Unit of measurement of the values. |
stats | list of objects | yes | List of statistics rows. Each row needs a start timestamp (top of an hour) plus mean/min/max and/or state/sum values. |
service: brain.import_statisticsdata: statistic_id: sensor.gas_meter has_mean: false has_sum: true unit_of_measurement: "m³" stats: - start: "2026-07-01T00:00:00+00:00" state: 1234.5 sum: 1234.5 - start: "2026-07-01T01:00:00+00:00" state: 1235.1 sum: 1235.1🗣️ “My energy dashboard has a gap from when the meter was offline — backfill it from this CSV.”