Skip to content

Releases: buggedcom/HASS-Data-Points

0.6.0 Anomaly entities and AI query briefs

19 May 21:04

Choose a tag to compare

Performance & Stability

Eliminated HA executor exhaustion — The integration previously ran history and anomaly queries on HA's shared thread pool, which caused entire Home Assistant instances to freeze (dashboards unresponsive, automations queued) when large data ranges or multiple sensors were queried simultaneously. History fetching now runs on a dedicated isolated ThreadPoolExecutor, leaving HA's shared pool free for the rest of the system.

Request cancellation — In-flight WebSocket requests are now tracked and can be cancelled server-side. Navigating away, changing the date range, or closing a panel mid-load sends a cancel signal to stop the backend computation rather than letting it run to completion unseen.

Progressive history chunking fixed — Long-range history was being fetched in parallel chunks despite the "progressive" label. Chunks now fire sequentially so the chart renders incrementally and cancellation works correctly at chunk boundaries.

Anomaly Detection

Rate-of-change detection — A new point_to_point detection method identifies rapid changes between consecutive readings. Eight window size options (from 5 minutes to 24 hours) let you tune sensitivity for fast-changing sensors like power draw or temperature.

Anomaly monitors are entities — Anomaly monitors are added to allow HA automations to use anomalies when detected via turning the monitors into integration devices under the HASS Datapoints integration.

Screenshot 2026-05-19 at 23 46 26 Screenshot 2026-05-19 at 23 59 38 Screenshot 2026-05-19 at 23 46 42 Screenshot 2026-05-19 at 23 46 48

AI query brief localization — The AI query brief (used when opening the panel context in an MCP-connected AI assistant) is now fully localized: section headings and metadata labels translate into DE, ES, FR, PT, FI, and ZH-Hans. The instruction strings themselves intentionally stay in English so LLMs process them correctly.

‼ This is not an AI integration. This is simply a prompt instruction that contains relevant data and instructions so you can paste the prompt into an AI that has access to the HA MCP to allow it to do it's own analysis on the data.

Screenshot 2026-05-19 at 23 46 26 copy Screenshot 2026-05-19 at 23 47 26

Bug Fixes

  • Stepped series — Tooltips and crosshairs now correctly follow stepped/binary series instead of interpolating between steps
  • Duplicate sensor names — Sensors sharing the same friendly name now display with disambiguating suffixes in target rows and chart legends
  • Binary sensors — Binary sensor state display in charts corrected
  • Chart scroll position — Vertical scroll no longer jumps when the chart is tall and split-series mode is active; zoom sync math now uses actual zoom span
  • Color picking — Color selection in the series editor now live-updates the chart immediately
  • Anomaly monitor popup — Popup positioning and dismiss behavior refined
  • Monitor device info — Removed configuration_url from monitor device entries (caused HA config warnings)

Refactoring

These changes have no user-visible effect but significantly improve testability and reduce component size.
A large structural refactor extracted previously monolithic components into focused pure modules under src/lib/:

  • timeline-scale, range-scroll-math, range-pointer-math, range-scale-math — range/zoom math
  • chart-series-gaps, chart-analysis — chart data processing
  • comparison-windows, series-rows — panel state manipulation
  • popup utilities, history-config-diff — extracted side-effect-free helpers
  • monitor-wizard-logic — pure validation and step logic for the anomaly monitor wizard
  • Lit components migrated to @query/@queryAll decorators throughout atoms, molecules, and cards

Internal / Developer

  • pnpm test:py — runs the Python test suite via .venv/bin/pytest
  • Integration renamed internally from HassRecordsHassDatapoints throughout
  • Static documentation site scaffold added

0.5.2 (the 6-7 release)

18 May 21:42

Choose a tag to compare

Release 0.5.1+6-7

Changes

  • Issue #6: Lovelace card picker display names now use “Datapoints – …” instead of “Hass Records – …”.
  • Issue #7: Fix History card continuous growth by removing host clientHeight fallback from chart height calculation (prevents ResizeObserver feedback loop).
  • Backwards compatibility: hass-records-* card/editor tags remain supported as aliases; deprecated statistics card types render a migration hint.
  • Tooling: commitlint now allows long footer lines (footer-max-line-length disabled).

0.5.1 Anomaly detection using trends bug fixes and UI fixes

10 Apr 06:45

Choose a tag to compare

Anomaly trend override — the trend deviation anomaly method can now use an independent trend algorithm (e.g. LOWESS for anomaly detection while the chart shows linear). A new "Same as display trend" option is the default; it is automatically disabled and falls back to the first available method when trend lines are turned off for the series. Backend Python and WebSocket schema updated to support all five trend methods.

inline-select migration — removed the duplicated _renderSelect() helper from all five analysis/anomaly molecules and the chart-display sidebar section. All selects now use the shared atom. SelectOption extended with disabled?: boolean; inline-select renders disabled elements accordingly.

Tablet layout fix — at 720–900 px the collapsed sidebar was overflowing behind the chart because .page-sidebar sets min-width: min(380px, 85vw) at that breakpoint and .page-sidebar.collapsed never reset it. Added min-width: 0 to the collapsed rule.

Docs split — the README was split into four focused documents (docs/cards.md, docs/recording-datapoints.md, docs/history-and-analysis.md, docs/development.md) with the README reduced to an overview that links to each.

Hook fix — scripts/prepare-commit-msg now skips messages prefixed with fixup! or squash! so git rebase --autosquash subject matching is not corrupted.

Full Changelog: 0.5.0...0.5.1

0.5.0 Additional trend analysis methods

09 Apr 18:53

Choose a tag to compare

New features

Three new trend methods for the history chart

The trend analysis overlay now supports five methods. The three additions each fill a distinct niche:

  • Exponential moving average (EMA) — like rolling average but with less lag. Recent points are weighted more heavily so the curve responds faster to real changes without over-reacting to noise. The window selector controls the alpha weighting from very responsive (30m) to very smooth (28d).

  • Polynomial trend (quadratic) — fits a global quadratic curve across the entire visible window. Use this when you suspect a non-linear drift — a battery whose discharge is accelerating, a room that heats quickly then tapers off, or any series where a straight line misses an obvious arc.

  • LOWESS (Locally Weighted Scatterplot Smoothing) — a non-parametric adaptive smoother that follows the underlying shape of the data without assuming linearity or a fixed polynomial form. The window selector controls bandwidth: tight windows track rapid local changes, wide windows give a broad global view.

Internal

  • Trend math functions are no longer duplicated between the web worker and the analysis module — the worker now imports from @/cards/history/analysis
  • All five trend methods are available in the backend anomaly detection engine for trend-residual analysis
  • Golden master fixture tests added to catch regressions in TS and Python trend output independently

0.4.2 Security Fixes and Minor UI Tweaks

09 Apr 15:25

Choose a tag to compare

Security

  • Enforce entity-level read permissions on all data endpoints — users can only query entities their HA account has access to
  • Harden WebSocket API and service schema input validation — stricter type and range checks on all incoming parameters
  • Eliminate XSS vectors in chart and UI rendering — all dynamic innerHTML assignments replaced with Lit html/render() throughout tooltip, crosshair, legend, axis, and dialog code
  • Patch lodash prototype pollution (GHSA) — override to ≥ 4.18.0 via package.json overrides

What's New

  • Annotation dialog redesign — refreshed layout with improved target selector UX
  • Dev sync badgedev:sync builds now show a random 4-digit ID in the browser console, making it easy to confirm a new build has loaded

Bug Fixes

  • Fix Cannot read properties of null (reading 'nextSibling') crash when the crosshair moves into a time range with no data
  • Fix accessor syntax leaking into the bundle by enabling experimentalDecorators in the TypeScript/Vite config
  • Fix Storybook icon stubs — SVG <path> and <circle> elements now rendered in SVG namespace (was HTML namespace after Lit migration, causing invisible icons)

CI / Tooling

  • Add conventional commit validation, PR template, and issue templates
  • Migrate ESLint config from airbnb-base to eslint-config-airbnb-extended
  • Add version:patch, version:minor, version:major scripts to package.json
  • Add package.json version linting and Renovate trust policy
  • Exclude the generated JS bundle from CodeQL analysis
  • Add explicit least-privilege permissions to all CI workflows
  • Pass --stats-json to Storybook build to enable Chromatic TurboSnap

Full Changelog: 0.4.1...0.4.2

0.4.1

09 Apr 11:00

Choose a tag to compare

General security updates post initial release:

  • Escape event icon HTML in sensor chart to prevent XSS
  • Require admin for WebSocket update, delete, and delete-dev-events commands
  • Add UUID validation for event_id WebSocket parameters
  • Fix SQL identifier quoting to prevent injection via double-quote characters
  • Validate comparison_entity_id as a proper HA entity_id
  • Cap anomaly cache entries at 5 MB to prevent DoS via oversized payloads
  • Sanitise date input in store: catch invalid ISO strings and reject implausible years (< 1970 or > 2100)
  • Add http to manifest.json dependencies (hassfest requirement)
  • Admin-only recording: the quick card, action card, and history chart + button are hidden for non-admin users with a clear locked-state message; automations and service calls are unaffected
  • Admin-only editing: edit and delete buttons in the list card are hidden for non-admin users; the visibility toggle remains available to all users
  • Test coverage: Python WebSocket admin-guard tests; TypeScript non-admin UI tests for list card and dev tool results

Development tooling updates

  • Python linting via ruff added to pre-commit hook and CI
  • Git pre-commit hook extended to cover Prettier, ruff, TypeScript type check, and bundle rebuild
  • README: i18n section corrected to reflect actual file structure and locale coverage; WebSocket table annotated with admin requirement

Full Changelog: 0.4.0...0.4.1

0.4.0

09 Apr 02:00

Choose a tag to compare

Initial release. Please view the README for information.