Energy Horizon 1.1.0
What's new – Highlights
1. Advanced offset (ISO-8601 Standard)
We have introduced the ability to precisely define the start of a time window down to the day or even the hour. Starting with version 1.1.0, the offset duration parameter supports ISO-8601 notation (e.g., P4M4D), allowing you to combine different time units in a single entry. For example, P3Y6M4DT12H represents a duration of "three years, six months, four days, twelve hours".
- Backward Compatibility: The old notation (e.g.,
+4d/+4M) is still supported, but we recommend switching to the ISO standard for greater flexibility.
Example:
If your annual billing period starts on May 15th (which is 4 months and 14 days after the start of the year), configure the card as follows:
time_window:
step: 1y
duration: 1y
anchor: start_of_year
# Offset: +4 months from 1st month and +14 days from 1st day = 15th May
offset: P4M14D
2. New Interpretation Logic — Consumption vs. Production
The card can now correctly interpret not only energy consumption but also production (e.g., from solar PV). You can now clearly define the nature of your data in both the visual editor and YAML, which directly affects data presentation and trend color coding.
- Options:
consumption(default) orproduction.
YAML:
interpretation: production
# Default: consumption3. Intelligent Comments and Consistent Narrative
We have improved the text generation algorithm (narrative). Comments below the chart now dynamically adapt to custom time steps (step). If your time window does not align with a full calendar month, the card will use precise phrasing consistent with your specific configuration.
Example: With step: 1w, instead of generic phrases, you will see a summary referring directly to seven-day intervals.
YAML:
time_window:
step: 1w
duration: 1w
anchor: start_of_week
4. Neutral State (Deadband) Threshold Configuration
We have introduced a "deadband" (neutral zone) for trends. You can now define a percentage threshold below which any change in value is treated as a neutral state (indicating no significant increase or decrease).
Example:
neutral_interpretation: 10
# Changes within ±10% will be marked as neutral
# default value when not defined ±2%
Technical changlog
Added
- Compound ISO 8601 offset (
time_window.offset): theoffsetfield now accepts a full ISO 8601 duration string (P4M4D,-P2M,P1M15D, etc.), so you can set precise custom window starts (e.g. a billing / fiscal year from 5 May withoffset: P4M4Dfromstart_of_year). Windows are built with LuxonDateTime.plus(Duration)— end-of-month clamping is deterministic. Sub-hour offsets are rejected with a configuration error. The legacy+1d/+3M-style form remains supported as a shim to the equivalentPform (deprecated; will be removed later). Implementation: single parsersrc/card/time-windows/parse-time-window-offset.ts(FR-900-Q); Vitest coverage intests/unit/time-windows-offset-iso.test.tsand extendedtime-windows-{merge-validate,presets-golden,resolve}.test.ts(SC-900-6 / US-900 stories). - Narrative engine (step-based copy): the comparison comment now picks the period phrase from merged YAML
time_window.step(viaclassifyComparisonStep), not from resolved window geometry — so billing offsets and non-calendar steps (1w,16d,3M, …) match the configured intent. Translation layout istext_summary.{consumption|production|generic}.{higher|lower|similar|neutral_band}plustext_summary.period.{day|week|month|year|reference}and sharedtext_summary.insufficient_data/text_summary.no_reference; optional entity keys fall back to mandatorytext_summary.generic.*. Contributor grammar notes:src/translations/CONTEXT.md. interpretation(consumption|production, default consumption): aligns the comparison narrative, trend icon, and chart delta segment with whether the entity represents usage (less is better) or generation (more is better). Delta chip numeric signs stay arithmetic; Forecast | Total copy is unchanged.neutral_interpretation: optional non-negative percent T (default 2). When the chip’s signed percent p satisfies |p| ≤ T, narrative and chart delta use neutral “similar” styling. YAML-only in this release; the visual editor preserves the key via shallow merge.- Visual editor control for
interpretation(Consumption / Production). - Translations (
en,pl,de,fr) for production-oriented narrative, neutral-band text, and editor labels.
Changed
- Interpretation in the comparison comment (behavior / copy): the narrative no longer infers “month vs year” from resolved window geometry (consecutive calendar months). It uses merged
time_window.stepand mapsinterpretation: production/consumptionto the newtext_summary.*key layout withtext_summary.generic.*fallback — so production and consumption keep the correct semantic polarity and the period phrase (day / week / month / year / reference) matches the configured step and anyoffset, without spurious “last year” phrasing. Insufficient comparison data usestext_summary.insufficient_data, nottext_summary.no_reference.
Learn More
Full Changelog: 1.0.2...1.1.0-beta