hass.tibber_prices/docs/developer
Julian Pawlowski 3a25bd260e feat(binary_sensor): expose period calculation diagnostics as attributes
Add calculation summary attributes to best_price_period and
peak_price_period binary sensors for diagnostic transparency.

New attributes (all excluded from recorder history):
- min_periods_configured: User's configured target per day (always shown)
- periods_found_total: Actual periods found across all days (always shown)
- flat_days_detected: Days where CV <= 10% reduced target to 1 (only when > 0)
- relaxation_incomplete: Some days couldn't reach the target (only when true)

These attributes explain observed behavior without requiring users to
read logs: seeing "flat_days_detected: 1" alongside
"min_periods_configured: 2, periods_found_total: 1" immediately
explains why the count is lower than configured on uniform-price days.

Implementation:
- _compute_day_effective_min() now returns (dict, int) tuple to propagate
  the flat day count through to the metadata dict
- flat_days_detected added to metadata["relaxation"] in
  calculate_periods_with_relaxation()
- build_final_attributes_simple() gains optional period_metadata parameter
- New add_calculation_summary_attributes() function handles the rendering
- Attributes are shown even when no period is currently active

Updated recorder-optimization.md: attribute counts + clarified that
timestamp is correctly excluded (entity native_value is recorded
separately by HA as the entity state itself).

Impact: Users can understand why they received fewer periods than
configured without enabling debug logging.
2026-04-06 12:18:48 +00:00
..
docs feat(binary_sensor): expose period calculation diagnostics as attributes 2026-04-06 12:18:48 +00:00
src docs: Add BMC logo SVG file to the images directory 2025-12-06 02:35:39 +00:00
static chore: Update logo and icons for Tibber Prices Integration 2025-12-07 19:00:32 +00:00
versioned_docs docs: add version snapshot v0.27.0 and cleanup old versions [skip ci] 2026-03-29 18:59:51 +00:00
.gitignore git commit -m "feat(docs): add dual Docusaurus sites with custom branding and Giscus integration 2025-12-06 01:37:06 +00:00
docusaurus.config.ts chore: Update logo and icons for Tibber Prices Integration 2025-12-07 19:00:32 +00:00
package-lock.json git commit -m "feat(docs): add dual Docusaurus sites with custom branding and Giscus integration 2025-12-06 01:37:06 +00:00
package.json git commit -m "feat(docs): add dual Docusaurus sites with custom branding and Giscus integration 2025-12-06 01:37:06 +00:00
README.md git commit -m "feat(docs): add dual Docusaurus sites with custom branding and Giscus integration 2025-12-06 01:37:06 +00:00
sidebars.ts feat(coordinator): implement repairs system for proactive user notifications 2025-12-07 20:51:43 +00:00
tsconfig.json git commit -m "feat(docs): add dual Docusaurus sites with custom branding and Giscus integration 2025-12-06 01:37:06 +00:00
versions.json docs: add version snapshot v0.27.0 and cleanup old versions [skip ci] 2026-03-29 18:59:51 +00:00

Website

This website is built using Docusaurus, a modern static website generator.

Installation

yarn

Local Development

yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Using SSH:

USE_SSH=true yarn deploy

Not using SSH:

GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.