Free · Home Assistant · SWF-025

Energy Data Foundation

Prove what your Home Assistant entities mean before an automation depends on them. This guide gives you a safe inventory, a reusable signed-grid layer, and a clear go/no-go gate for all four paid kits.

No hardware recommendationAbout 30–45 minutesNo savings promise

Language: English · Deutsch · Nederlands

1. Start with evidence, not a brand list

A device is useful to an automation only when Home Assistant exposes the right entity with the right meaning. Two meters from the same brand may differ by model, region, firmware, integration, or account. This guide therefore checks entity behaviour rather than promising compatibility from a logo.

Use what already works

Begin with an installed integration that reports normally in Home Assistant. This guide does not ask you to buy a meter, cable, gateway, charger, or sensor.

Stay outside the panel

Never open a sealed meter or electrical panel. P1 activation, CT placement, wiring, network repair, and physical verification belong to the manufacturer, operator, or a qualified professional.

Stop on ambiguity

If a state, unit, direction, or update interval is unclear, record “not ready.” Do not hide uncertainty with a fallback value or an attractive dashboard.

This is a data gate, not a safety test. Home Assistant is not a certified electrical protection system. Device-native limits, breakers, compliant wiring, and manufacturer safeguards remain responsible for safety.

2. Separate power, energy, demand, and price

QuantityTypical unitWhat it answersCommon wrong substitute
Instantaneous powerW or kWHow fast electricity is flowing now.A cumulative kWh meter.
Cumulative energykWhHow much import has accumulated over time.A daily-reset statistic or current watts.
Quarter-hour average demandkWThe average demand accumulated inside the current 15-minute interval.One instantaneous sample or a 15-minute maximum.
Calendar-month maximum demandkWThe highest relevant demand value exposed for the current month.A lifetime maximum or current-quarter value.
Current electricity priceEUR/kWh or €/kWhThe price basis applying now.EUR/MWh, cents/kWh, tomorrow's list, or a bill total.

Home Assistant stores entity states as text, so “numeric” means the current state can be parsed as a finite number. Values such as unknown, unavailable, empty text, or a price containing a currency symbol are not numeric states. The unit belongs in the unit_of_measurement attribute, not inside the state.

3. Build an entity inventory in Developer Tools

  1. Open Developer Tools → States. Search by the integration or device name. Do not choose an entity from its friendly name alone.
  2. Copy the exact entity ID. Record the current state, unit_of_measurement, device_class, and what physical quantity the integration documentation says it represents.
  3. Check numeric form. In Developer Tools → Template, replace the example ID below and confirm the last line returns True.
  4. Observe real behaviour. Use an appliance through its normal controls and watch at least two update cycles. Never create a test by bypassing device or electrical protection.
  5. Write down uncertainty. “Probably import” is not evidence. Keep the entity out of automation until its meaning and direction are confirmed.
{{ states('sensor.your_candidate') }}
{{ state_attr('sensor.your_candidate', 'unit_of_measurement') }}
{{ state_attr('sensor.your_candidate', 'device_class') }}
{{ is_number(states('sensor.your_candidate')) }}

The States tool shows current software state; it does not prove a meter, clamp, cable, or circuit is physically correct.

4. Prove signed grid semantics

The optional Foundation normalizer expects one signed net-grid power entity: positive means import from the grid and negative means export to the grid. A house-consumption sensor, PV-production sensor, or inverter-output sensor is not the same quantity.

Import observation

During ordinary grid import, switch a known non-essential appliance using its normal control. The signed grid value should become more positive by a plausible amount. Do not infer direction from the entity name alone.

Export observation

If the home already exports solar power, observe a normal export period. The value should be negative. If no export occurs naturally, record that the negative direction is not yet physically verified; do not manufacture an electrical test.

Expected split: signed +2300 W becomes import 2300 W and export 0 W. Signed -800 W becomes import 0 W and export 800 W. The export entity is a positive magnitude for easier dashboards.

If your integration exposes separate import and export power entities, neither one by itself satisfies the signed-source contract. Combining them can be valid only when their units, update timing, and semantics are understood. The supplied file does not silently make that assumption.

5. Check freshness and honest failure

A numeric value can be stale. Watch History or the entity details while normal load changes occur. Record how quickly the source reacts and whether its integration reports regularly when the value stays unchanged. Compare that behaviour with the paid kit's required interval.

Important limitation: binary_sensor.swf025_energy_data_problem detects unavailable/invalid normalized power or energy. It does not measure source age. A frozen but numeric source can still look healthy, so the manual freshness check remains required.

6. Install the optional normalization package

Download the public swf_grid.yaml core plus swf025_energy_data_health.yaml only after identifying one signed grid-power source in W or kW and one cumulative imported-energy source in kWh. Back up Home Assistant first. Install exactly one grid core; if the shared entities already exist, keep that copy and add only the Foundation energy-health file.

  1. Replace the single sensor.REPLACE_GRID_POWER in swf_grid.yaml with the verified signed power entity.
  2. Replace every sensor.REPLACE_GRID_IMPORT_KWH with the verified cumulative import entity.
  3. Run Developer Tools → YAML → Check configuration. Resolve every error before restarting.
  4. After restart, confirm these exact entities exist:
sensor.swf_grid_power_w
sensor.swf_grid_import_w
sensor.swf_grid_export_w
binary_sensor.swf_grid_data_problem
sensor.swf025_grid_import_energy
binary_sensor.swf025_energy_data_problem

The swf025_* product namespace is deliberate. It keeps SWF-025's unique IDs and entity IDs separate from SWF-020 and other products. Do not rename them back to bare swf_grid_* IDs. If Home Assistant creates _2, find the stale or duplicate entry under Settings → Devices & services → Entities and resolve it before proceeding; the package's internal references expect the exact IDs above.

7. Dry-run without touching live hardware

If you want to test the package first, create two Number helpers through Settings → Devices & services → Helpers. Give one a range that includes negative values and unit W; give the other a non-negative range and unit kWh. Assign clear IDs such as input_number.swf025_test_grid_power_w and input_number.swf025_test_import_kwh, map those two helpers in a test copy of the package, check configuration, and restart.

Set the helpers toExpected normalized resultWhat it proves
Power 2300 W; energy 1234.5 kWhGrid/import 2300 W; export 0 W; energy 1234.5 kWh; problem off.Positive import and cumulative energy path.
Power -800 WGrid −800 W; import 0 W; export 800 W.Negative export split.
Use a power helper configured in kW and set 2.3Grid/import 2300 W.kW-to-W conversion.
Temporarily set a test source state to unavailable in Developer Tools → StatesDependent normalized entity unavailable; problem on.Visible fail-closed behaviour.

Developer Tools → States changes Home Assistant's temporary state representation; it does not command the real device. Use only the test helpers for failure simulation, then change the helper normally to restore it. After the dry run, remap a clean package copy to verified live entities and repeat the configuration check.

8. Per-product readiness matrix

KitRequired Home Assistant evidenceReady whenStop when
SWF-030 EV Smart ChargingWritable charger/EV switch; connection entity; numeric SOC 0–100%; manual hold and departure helpers; price/solar opportunity signals as used.The manufacturer's integration supports safe start/stop, connection means physically connected and ready, SOC is fresh, and a manual off test succeeds while native protections remain active.The switch is read-only, cloud commands are unreliable, “connected” only means the wallbox is online, SOC is stale/textual, or native limits would be bypassed.
SWF-040 Heat Pump Comfort & CostOne writable single-target climate entity with numeric temperature; separate numeric room sensor in °C; optional trusted energy signal.A manual request for the already-safe target updates only the target, the HVAC mode stays unchanged, and the independent sensor is stable and representative.The entity exposes only a target range, rejects standard target actions, changes modes unexpectedly, or the room reading is unavailable/non-numeric.
SWF-050 Flemish Peak PlannerHome in Flanders with a digital meter; live net import in W/kW; current quarter-hour average demand in W/kW; current calendar-month maximum demand in W/kW.All three meanings, units, and update behaviour are verified. The Foundation's signed power may help with live import, but the meter/integration must separately expose the quarter average and monthly maximum.You only have instantaneous power and cumulative energy, are outside Flanders, or cannot identify the two demand entities. SWF-025 does not derive them.
SWF-060 Dynamic Tariff AutomationNumeric current-price entity in EUR/kWh or €/kWh, updating at least hourly, with documented included taxes/fees and a known outage state.One live interval matches the provider basis, units are confirmed, cost components are understood, and missing data never becomes zero. Normal device schedules remain independent.The source is EUR/MWh, cents/kWh, another currency, a future-price list, text, stale, or financially unexplained. Grid power/energy are not price inputs.

9. Record a go/no-go decision

Ready for the selected kit

  • Every required entity has an exact ID.
  • Each state is numeric where required.
  • Unit and sign are proven.
  • Freshness and outage behaviour are visible.
  • A safe rollback or normal schedule remains available.

Not ready yet

  • A required entity is missing or ambiguous.
  • The source freezes while looking valid.
  • Testing would require electrical work.
  • A control bypasses manufacturer safeguards.
  • The product-specific row above is incomplete.

Save a short record with the date, Home Assistant version, integration name, exact entity IDs, units, sign convention, observed update interval, failure behaviour, and the product row you passed. Repeat the gate after an integration, firmware, meter, tariff, or major Home Assistant change.

A “not ready” result is useful. It prevents buying a kit that cannot yet receive trustworthy inputs. Resolve software questions with the integration documentation or vendor and physical questions with a qualified professional; no hardware purchase is implied by this guide.