Commit graph

504 commits

Author SHA1 Message Date
github-actions[bot]
994eecdd3d docs: add version snapshot v0.27.0 and cleanup old versions [skip ci] 2026-03-29 18:59:51 +00:00
Julian Pawlowski
4d822030f9 fix(ci): bump Python to 3.14 and pin uv venv to setup-python interpreter
homeassistant==2026.3.4 requires Python>=3.14.2. The lint workflow was
specifying Python 3.13, and uv venv was ignoring actions/setup-python and
picking up the system Python (3.14.0) instead.

Changes:
- lint.yml: python-version 3.13 → 3.14
- bootstrap: uv venv now uses $(which python) to respect
  actions/setup-python and local pyenv/asdf setups

Impact: lint workflow no longer fails with Python version unsatisfiable
dependency error when installing homeassistant.
2026-03-29 18:55:23 +00:00
Julian Pawlowski
b92becdf8f chore(release): bump version to 0.27.0 2026-03-29 18:49:21 +00:00
Julian Pawlowski
566ccf4017 fix(scripts): anchor grep pattern to prevent false tag match
grep -q "refs/tags/$TAG" matched substrings, so v0.27.0b0
would block release of v0.27.0. Changed to "refs/tags/${TAG}$"
to require exact end-of-line match.
2026-03-29 18:49:18 +00:00
Julian Pawlowski
0381749e6f fix(interval_pool): fix DST spring-forward causing missing tomorrow intervals
_get_cached_intervals() used fixed-offset datetimes from fromisoformat()
for iteration. When start and end boundaries span a DST transition (e.g.,
+01:00 CET → +02:00 CEST), the loop's end check compared UTC values,
stopping 1 hour early on spring-forward days.

This caused the last 4 quarter-hourly intervals of "tomorrow" to be
missing, making the binary sensor "Tomorrow data available" show Off
even when full data was present.

Changed iteration to use naive local timestamps, matching the index key
format (timezone stripped via [:19]). The end boundary comparison now
works correctly regardless of DST transitions.

Impact: Binary sensor "Tomorrow data available" now correctly shows On
on DST spring-forward days. Affects all European users on the last
Sunday of March each year.
2026-03-29 18:42:27 +00:00
Julian Pawlowski
00a653396c fix(translations): update API token instructions to use placeholder for Tibber URL 2026-03-29 18:19:42 +00:00
Julian Pawlowski
dbe73452f7 fix(devcontainer): update Python version to 3.14 in devcontainer configuration
fix(pyproject): require Python version 3.14 in project settings
2026-03-29 18:19:33 +00:00
Julian Pawlowski
9123903b7f fix(bootstrap): update default Home Assistant version to 2026.3.4 2026-03-29 18:04:50 +00:00
dependabot[bot]
5cab2a37b0
chore(deps): bump actions/deploy-pages from 4 to 5 (#95)
Some checks failed
Deploy Docusaurus Documentation (Dual Sites) / Build and Deploy Documentation Sites (push) Has been cancelled
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 4 to 5.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-28 15:52:47 +01:00
dependabot[bot]
e796660112
chore(deps): bump actions/configure-pages from 5 to 6 (#96)
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 5 to 6.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-28 15:51:35 +01:00
dependabot[bot]
719344e11f
chore(deps-dev): bump setuptools from 82.0.0 to 82.0.1 (#88)
Some checks failed
Lint / Ruff (push) Has been cancelled
Validate / Hassfest validation (push) Has been cancelled
Validate / HACS validation (push) Has been cancelled
Bumps [setuptools](https://github.com/pypa/setuptools) from 82.0.0 to 82.0.1.
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v82.0.0...v82.0.1)

---
updated-dependencies:
- dependency-name: setuptools
  dependency-version: 82.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-22 21:12:08 +01:00
dependabot[bot]
a59096eeff
chore(deps): bump astral-sh/setup-uv from 7.3.1 to 7.6.0 (#92)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 7.3.1 to 7.6.0.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](5a095e7a20...37802adc94)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-22 21:11:41 +01:00
dependabot[bot]
afd626af05
chore(deps): bump home-assistant/actions (#93)
Bumps [home-assistant/actions](https://github.com/home-assistant/actions) from dce0e860c68256ef2902ece06afa5401eb4674e1 to d56d093b9ab8d2105bc0cb6ee9bcc0ef4ec8b96d.
- [Release notes](https://github.com/home-assistant/actions/releases)
- [Commits](dce0e860c6...d56d093b9a)

---
updated-dependencies:
- dependency-name: home-assistant/actions
  dependency-version: d56d093b9ab8d2105bc0cb6ee9bcc0ef4ec8b96d
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-22 21:11:16 +01:00
dependabot[bot]
e429dcf945
chore(deps): bump astral-sh/setup-uv from 7.3.0 to 7.3.1 (#87)
Some checks failed
Lint / Ruff (push) Has been cancelled
Validate / Hassfest validation (push) Has been cancelled
Validate / HACS validation (push) Has been cancelled
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 11:48:42 +01:00
dependabot[bot]
86c28acead
chore(deps): bump home-assistant/actions (#86)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 11:48:27 +01:00
Julian Pawlowski
92520051e4 fix(devcontainer): remove unused VS Code extensions from configuration
Some checks failed
Lint / Ruff (push) Has been cancelled
Validate / Hassfest validation (push) Has been cancelled
Validate / HACS validation (push) Has been cancelled
2026-02-16 16:25:16 +00:00
dependabot[bot]
ee7fc623a7
chore(deps-dev): bump setuptools from 80.10.2 to 82.0.0 (#85)
Some checks failed
Lint / Ruff (push) Has been cancelled
Validate / Hassfest validation (push) Has been cancelled
Validate / HACS validation (push) Has been cancelled
2026-02-10 16:14:58 +01:00
dependabot[bot]
da64cc4805
chore(deps): bump astral-sh/setup-uv from 7.2.1 to 7.3.0 (#84)
Some checks failed
Lint / Ruff (push) Has been cancelled
Validate / Hassfest validation (push) Has been cancelled
Validate / HACS validation (push) Has been cancelled
2026-02-07 11:27:27 +01:00
dependabot[bot]
981089fe68
chore(deps): update ruff requirement (#83)
Some checks failed
Lint / Ruff (push) Has been cancelled
Validate / Hassfest validation (push) Has been cancelled
Validate / HACS validation (push) Has been cancelled
2026-02-04 07:56:44 +01:00
dependabot[bot]
d3f3975204
chore(deps): bump astral-sh/setup-uv from 7.2.0 to 7.2.1 (#81)
Some checks failed
Lint / Ruff (push) Has been cancelled
Validate / Hassfest validation (push) Has been cancelled
Validate / HACS validation (push) Has been cancelled
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](61cb8a9741...803947b9bd)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-30 22:39:55 +01:00
dependabot[bot]
49cdb2c28a
chore(deps-dev): bump setuptools from 80.10.1 to 80.10.2 (#80) 2026-01-27 09:02:44 +01:00
dependabot[bot]
73b7f0b2ca
chore(deps): bump home-assistant/actions (#79) 2026-01-27 09:02:27 +01:00
dependabot[bot]
152f104ef0
chore(deps): bump actions/setup-python from 6.1.0 to 6.2.0 (#78) 2026-01-23 08:51:12 +01:00
dependabot[bot]
72b42460a0
chore(deps-dev): bump setuptools from 80.9.0 to 80.10.1 (#77) 2026-01-22 06:57:04 +01:00
Julian Pawlowski
1bf031ba19 fix(options_flow): enhance translation handling for config fields and update language fallback 2026-01-21 18:35:19 +00:00
Julian Pawlowski
89880c7755 chore(release): bump version to 0.27.0b0 2026-01-21 17:37:35 +00:00
Julian Pawlowski
631cebeb55 feat(config_flow): show override warnings when config entities control settings
When runtime config override entities (number/switch) are enabled,
the Options Flow now displays warning indicators at the top of each
affected section. Users see which fields are being managed by config
entities and can still edit the base values if needed.

Changes:
- Add ConstantSelector warnings in Best Price/Peak Price sections
- Implement multi-language support for override warnings (de, en, nb, nl, sv)
- Add _get_override_translations() to load translated field labels
- Add _get_active_overrides() to detect enabled override entities
- Extend get_best_price_schema/get_peak_price_schema with translations param
- Add 14 number/switch config entities for runtime period tuning
- Document runtime configuration entities in user docs

Warning format adapts to overridden fields:
- Single: "⚠️ Flexibility controlled by config entity"
- Multiple: "⚠️ Flexibility and Minimum Distance controlled by config entity"

Impact: Users can now dynamically adjust period calculation parameters
via Home Assistant automations, scripts, or dashboards without entering
the Options Flow. Clear UI indicators show which settings are currently
overridden.
2026-01-21 17:36:51 +00:00
Julian Pawlowski
cc75bc53ee feat(services): add average indicator for hourly resolution in charts
Add visual indicators to distinguish hourly aggregated data from
original 15-minute interval data in ApexCharts output.

Changes:
- Chart title: Append localized suffix like "(Ø hourly)" / "(Ø stündlich)"
- Y-axis label: Append "(Ø)" suffix, e.g., "øre/kWh (Ø)"

The suffix pattern avoids confusion with Scandinavian currency symbols
(øre/öre) which look similar to the average symbol (Ø) when used as prefix.

Added hourly_suffix translations for all 5 languages (en, de, sv, nb, nl).

Impact: Users can now clearly see when a chart displays averaged hourly
data rather than original 15-minute prices.
2026-01-20 16:44:18 +00:00
Julian Pawlowski
b541f7b15e feat(apexcharts): add legend toggle for best/peak price overlays
Implement clickable legend items to show/hide best/peak price period
overlays in generated ApexCharts YAML configuration.

Legend behavior by configuration:
- Only best price: No legend (overlay always visible)
- Only peak price: Legend shown, peak toggleable (starts hidden)
- Both enabled: Legend shown, both toggleable (best visible, peak hidden)

Changes:
- Best price overlay: in_legend only when peak also enabled
- Peak price overlay: always in_legend with hidden_by_default: true
- Enable experimental.hidden_by_default when peak price active
- Price level series (LOW/NORMAL/HIGH): hidden from legend when
  overlays active, visible otherwise (preserves easy legend enable)
- Add triangle icons (▼/▲) before overlay names for visual distinction
- Custom legend markers (size: 0) only when overlays active
- Increased itemMargin for better visual separation

Impact: Users can toggle best/peak price period visibility directly
in the chart via legend click. Without overlays, legend behavior
unchanged - users can still enable it by setting show: true.
2026-01-20 16:27:14 +00:00
Julian Pawlowski
2f36c73c18 feat(services): add hourly resolution option for chart data services
Add resolution parameter to get_chartdata and get_apexcharts_yaml services,
allowing users to choose between original 15-minute intervals or aggregated
hourly values for chart visualization.

Implementation uses rolling 5-interval window aggregation (-2, -1, 0, +1, +2
around :00 of each hour = 60 minutes total), matching the sensor rolling
hour methodology. Respects user's CONF_AVERAGE_SENSOR_DISPLAY setting for
mean vs median calculation.

Changes:
- formatters.py: Add aggregate_to_hourly() function preserving original
  field names (startsAt, total, level, rating_level) for unified processing
- get_chartdata.py: Pre-aggregate data before processing when resolution is
  'hourly', enabling same code path for filters/insert_nulls/connect_segments
- get_apexcharts_yaml.py: Add resolution parameter, pass to all 4 get_chartdata
  service calls in generated JavaScript
- services.yaml: Add resolution field with interval/hourly selector
- icons.json: Add section icons for get_apexcharts_yaml fields
- translations: Add highlight_peak_price and resolution field translations
  for all 5 languages (en, de, sv, nb, nl)

Impact: Users can now generate cleaner charts with 24 hourly data points
instead of 96 quarter-hourly intervals. The unified processing approach
ensures all chart features (filters, null insertion, segment connection)
work identically for both resolutions.
2026-01-20 15:51:34 +00:00
Julian Pawlowski
1b22ce3f2a feat(config_flow): add entity status checks to options flow pages
Added dynamic warnings when users configure settings for sensors that
are currently disabled. This improves UX by informing users that their
configuration changes won't have any visible effect until they enable
the relevant sensors.

Changes:
- Created entity_check.py helper module with sensor-to-step mappings
- Added check_relevant_entities_enabled() to detect disabled sensors
- Integrated warnings into 6 options flow steps (price_rating,
  price_level, best_price, peak_price, price_trend, volatility)
- Made Chart Data Export info page content-aware: shows configuration
  guide when sensor is enabled, shows enablement instructions when disabled
- Updated all 5 translation files (de, en, nb, nl, sv) with dynamic
  placeholders {entity_warning} and {sensor_status_info}

Impact: Users now receive clear feedback when configuring settings for
disabled sensors, reducing confusion about why changes aren't visible.
Chart Data Export page now provides context-appropriate guidance.
2026-01-20 13:59:07 +00:00
Julian Pawlowski
5fc1f4db33 feat(sensors): add 5-level price trend scale with configurable thresholds
Extends trend sensors from 3-level (rising/stable/falling) to 5-level scale
(strongly_rising/rising/stable/falling/strongly_falling) for finer granularity.

Changes:
- Add PRICE_TREND_MAPPING with integer values (-2, -1, 0, +1, +2) matching
  PRICE_LEVEL_MAPPING pattern for consistent automation comparisons
- Add configurable thresholds for strongly_rising (default: 6%) and
  strongly_falling (default: -6%) independent from base thresholds
- Update calculate_price_trend() to return 3-tuple: (trend_state, diff_pct, trend_value)
- Add trend_value attribute to all trend sensors for numeric comparisons
- Update sensor entity descriptions with 5-level options
- Add validation with cross-checks (strongly_rising > rising, etc.)
- Update icons: chevron-double-up/down for strong trends, trending-up/down for normal

Files changed:
- const.py: PRICE_TREND_* constants, PRICE_TREND_MAPPING, config constants
- utils/price.py: Extended calculate_price_trend() signature and return value
- sensor/calculators/trend.py: Pass new thresholds, handle 3-tuple return
- sensor/definitions.py: 5-level options for all 9 trend sensors
- sensor/core.py: 5-level icon mapping
- entity_utils/icons.py: 5-level trend icons
- config_flow_handlers/: validators, schemas, options_flow for new settings
- translations/*.json: Labels and error messages (en, de, nb, sv, nl)
- tests/test_percentage_calculations.py: Updated for 3-tuple return

Impact: Users get more nuanced trend information for automation decisions.
New trend_value attribute enables numeric comparisons (e.g., > 0 for any rise).
Existing automations using "rising"/"falling"/"stable" continue to work.
2026-01-20 13:36:01 +00:00
Julian Pawlowski
972cbce1d3 chore(release): bump version to 0.26.0 2026-01-20 12:40:37 +00:00
Julian Pawlowski
f88d6738e6 fix(validation): enhance user data validation to require active subscription and price info.
Fixes #73
2026-01-20 12:33:45 +00:00
Julian Pawlowski
4b32568665 fix(tests): include current_interval_price_base in interval sensors and remove from known exceptions 2026-01-20 12:06:10 +00:00
dependabot[bot]
4ceff6cf5f
chore(deps): bump astral-sh/setup-uv from 7.1.6 to 7.2.0 (#72) 2026-01-07 12:39:25 +01:00
Julian Pawlowski
285258c325 chore: remove country list from hacs.json 2025-12-28 11:30:02 +00:00
Julian Pawlowski
3e6bcf2345 fix(sensor): synchronize current_interval_price_base with current_interval_price
Fixed inconsistency between "Current Electricity Price" and "Current Electricity Price
(Energy Dashboard)" sensors that were showing different prices and icons.

Changes:
- Add current_interval_price_base to TIME_SENSITIVE_ENTITY_KEYS so it updates at
  quarter-hour boundaries instead of only on API polls. This ensures both sensors
  update synchronously when a new 15-minute interval starts.
- Use interval_data["startsAt"] as timestamp for current interval price sensors
  (both variants) instead of rounded calculation time. This prevents timestamp
  divergence when sensors update at slightly different times.
- Include current_interval_price_base in icon color attribute mapping so both
  sensors display the same dynamic cash icon based on current price level.
- Include current_interval_price_base in dynamic icon function so it gets the
  correct icon based on current price level (VERY_CHEAP/CHEAP/NORMAL/EXPENSIVE).

Impact: Both sensors now show identical prices, timestamps, and icons as intended.
They update synchronously at interval boundaries (00, 15, 30, 45 minutes) and
correctly represent the Energy Dashboard compatible variant without lag or
inconsistencies.
2025-12-26 16:23:05 +00:00
Julian Pawlowski
0a4af0de2f feat(sensor): convert timing sensors to hour-based display with minute attributes
Convert best_price and peak_price timing sensors to display in hours (UI-friendly)
while retaining minute values in attributes (automation-friendly). This improves
readability in dashboards by using Home Assistant's automatic duration formatting
"1 h 35 min" instead of decimal "1.58 h".

BREAKING CHANGE: State unit changed from minutes to hours for 6 timing sensors.

Affected sensors:
  * best_price_period_duration, best_price_remaining_minutes, best_price_next_in_minutes
  * peak_price_period_duration, peak_price_remaining_minutes, peak_price_next_in_minutes

Migration guide for users:
  - If your automations use {{ state_attr(..., 'remaining_time') }} or similar:
    No action needed - attribute values remain in minutes
  - If your automations use {{ states('sensor.best_price_remaining_minutes') }} directly:
    Update to use the minute attribute instead: {{ state_attr('sensor.best_price_remaining_minutes', 'remaining_minutes') }}
  - If your dashboards display the state value:
    Values now show as "1 h 35 min" instead of "95" - this is the intended improvement
  - If your templates do math with the state: multiply by 60 to convert hours back to minutes
    Before: remaining * 60
    After: remaining_minutes (use attribute directly)

Implementation details:
- Timing sensors now use device_class=DURATION, unit=HOURS, precision=2
- State values converted from minutes to hours via _minutes_to_hours()
- New minute-precision attributes added for automation compatibility:
  * period_duration_minutes (for checking if period is long enough)
  * remaining_minutes (for countdown-based automation logic)
  * next_in_minutes (for time-to-event automation triggers)
- Translation improvements across all 5 languages (en, de, nb, nl, sv):
  * Descriptions now clarify state in hours vs attributes in minutes
  * Long descriptions explain dual-format architecture
  * Usage tips updated to reference minute attributes for automations
  * All translation files synchronized (fixed order, removed duplicates)
- Type safety: Added type assertions (cast) for timing calculator results to
  satisfy Pyright type checking (handles both float and datetime return types)

Home Assistant now automatically formats these durations as "1 h 35 min" for improved
UX, matching the behavior of battery.remaining_time and other duration sensors.

Rationale for breaking change:
The previous minute-based state was unintuitive for users ("95 minutes" doesn't
immediately convey "1.5 hours") and didn't match Home Assistant's standard duration
formatting. The new hour-based state with minute attributes provides:
- Better UX: Automatic "1 h 35 min" formatting in UI
- Full automation compatibility: Minute attributes for all calculation needs
- Consistency: Matches HA's duration sensor pattern (battery, timer, etc.)

Impact: Timing sensors now display in human-readable hours with full backward
compatibility via minute attributes. Users relying on direct state access must
migrate to minute attributes (simple change, documented above).
2025-12-26 16:03:00 +00:00
Julian Pawlowski
09a50dccff fix(sensor): streamline lifecycle attrs and next poll visibility
- Remove pool stats/fetch-age from lifecycle sensor to avoid stale data under state-change filtering; add `next_api_poll` for transparency.
- Clean lifecycle calculator by dropping unused helpers/constants and delete the obsolete cache age test.
- Clarify lifecycle state is diagnostics-only in coordinator comments, keep state-change filtering in timer test, and retain quarter-hour precision notes in constants.
- Keep sensor core aligned with lifecycle state filtering.

Impact: Lifecycle sensor now exposes only state-relevant fields without recorder noise, next API poll is visible, and dead code/tests tied to removed attributes are gone.
2025-12-26 12:13:36 +00:00
Julian Pawlowski
665fac10fc feat(services): add peak price overlay toggle to ApexCharts YAML
Added `highlight_peak_price` (default: false) to `get_apexcharts_yaml` service
and implemented a subtle red overlay analogous to best price periods using
`period_filter: 'peak_price'`. Tooltips now dynamically exclude overlay
series to prevent overlay tooltips.

Impact: Users can visualize peak-price periods in ApexCharts cards
when desired, with default opt-out behavior.
2025-12-26 00:07:28 +00:00
Julian Pawlowski
c6b34984fa chore: Remove outdated documentation for sensors and troubleshooting in version v0.25.0b0; update versioning logic to skip documentation versioning for beta releases. 2025-12-25 23:06:27 +00:00
github-actions[bot]
3624f1c9a8 docs: add version snapshot v0.25.0b0 and cleanup old versions [skip ci] 2025-12-25 22:54:51 +00:00
Julian Pawlowski
3968dba9d2 chore(release): enhance version parsing to support beta/prerelease suffix 2025-12-25 22:50:12 +00:00
Julian Pawlowski
3157c6f0df chore(release): bump version to 0.25.0b0 2025-12-25 22:48:07 +00:00
Julian Pawlowski
e851cb0670 chore(release): enhance version format validation to support prerelease tags 2025-12-25 22:48:01 +00:00
Julian Pawlowski
15e09fa210 docs(user): unify entity ID examples and add "Entity ID tip" across guides
Added a consistent "Entity ID tip" block and normalized all example
entity IDs to the `<home_name>` placeholder across user docs. Updated
YAML and example references to current entity naming (e.g.,
`sensor.<home_name>_current_electricity_price`,
`sensor.<home_name>_price_today`,
`sensor.<home_name>_today_s_price_volatility`,
`binary_sensor.<home_name>_best_price_period`, etc.). Refreshed
automation examples to use language-independent attributes (e.g.
`price_volatility`) and improved robustness. Aligned ApexCharts examples
to use `sensor.<home_name>_chart_metadata` and corrected references for
tomorrow data availability.

Changed files:
- docs/user/docs/actions.md
- docs/user/docs/automation-examples.md
- docs/user/docs/chart-examples.md
- docs/user/docs/configuration.md
- docs/user/docs/dashboard-examples.md
- docs/user/docs/dynamic-icons.md
- docs/user/docs/faq.md
- docs/user/docs/icon-colors.md
- docs/user/docs/period-calculation.md
- docs/user/docs/sensors.md

Impact: Clearer, language-independent examples that reduce confusion and
prevent brittle automations; easier copy/paste adaptation across setups;
more accurate guidance for chart configuration and period/volatility usage.
2025-12-25 19:20:37 +00:00
Julian Pawlowski
c6d6e4a5b2 fix(volatility): expose price coefficient variation attribute
Expose the `price_coefficient_variation_%` value across period statistics, binary sensor attributes, and the volatility calculator, and refresh the volatility descriptions/translations to mention the coefficient-of-variation metric.
2025-12-25 19:10:42 +00:00
Julian Pawlowski
23b4330b9a fix(coordinator): track API calls separately from cached data usage
The lifecycle sensor was always showing "fresh" state because
_last_price_update was set on every coordinator update, regardless of
whether data came from API or cache.

Changes:
- interval_pool/manager.py: get_intervals() and get_sensor_data() now
  return tuple[data, bool] where bool indicates actual API call
- coordinator/price_data_manager.py: All fetch methods propagate
  api_called flag through the call chain
- coordinator/core.py: Only update _last_price_update when api_called=True,
  added debug logging to distinguish API calls from cached data
- services/get_price.py: Updated to handle new tuple return type

Impact: Lifecycle sensor now correctly shows "cached" during normal
15-minute updates (using pool cache) and only "fresh" within 5 minutes
of actual API calls. This fixes the issue where the sensor would never
leave the "fresh" state during frequent HA restarts or normal operation.
2025-12-25 18:53:29 +00:00
Julian Pawlowski
81ebfb4916 feat(devcontainer): add Google Code Assistant and OpenAI ChatGPT extensions 2025-12-25 12:02:55 +00:00