@kipk/ha-better-history 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/decorate-DcIY_31L.js +2328 -0
- package/dist/define.js +1 -1
- package/dist/ha-better-history-Bf_QcE8w.js +2291 -0
- package/dist/ha-better-history.d.ts +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/picker.d.ts +1 -0
- package/dist/picker.js +2 -0
- package/dist/series-picker-element-GuL5icaQ.js +140 -0
- package/dist/types/config.d.ts +2 -0
- package/dist/ui/entity-picker.d.ts +3 -0
- package/dist/ui/series-picker-element.d.ts +38 -0
- package/package.json +8 -1
- package/dist/ha-better-history-BY4eqV1H.js +0 -4410
package/README.md
CHANGED
|
@@ -6,6 +6,9 @@ Standalone web component for Home Assistant history charts. Built with **Lit 3**
|
|
|
6
6
|
|
|
7
7
|
**Status: WIP** — API not yet stable.
|
|
8
8
|
|
|
9
|
+
If this component helps you, you can support development on
|
|
10
|
+
[Buy Me a Coffee](https://buymeacoffee.com/kipk).
|
|
11
|
+
|
|
9
12
|
## Why ha-better-history?
|
|
10
13
|
|
|
11
14
|
`ha-better-history` keeps the familiar Home Assistant history-chart experience, but exposes it as a reusable web component with extra controls for dashboards, dialogs, and custom cards.
|
|
@@ -124,6 +127,7 @@ Each series describes what to plot and how it should be displayed.
|
|
|
124
127
|
interface SeriesConfig {
|
|
125
128
|
entity: string; // Required: entity_id (e.g. "climate.living")
|
|
126
129
|
attribute?: string | string[]; // Dotted path or array; omit = entity.state
|
|
130
|
+
forced?: boolean; // default: true; false = removable from picker chips
|
|
127
131
|
label?: string; // Legend label; default = friendly_name or attribute path
|
|
128
132
|
color?: string; // CSS color; default = automatic palette
|
|
129
133
|
unit?: string; // Override unit (for axis grouping and label)
|
|
@@ -294,13 +298,14 @@ chart.config = {
|
|
|
294
298
|
chart.config = {
|
|
295
299
|
defaultEntities: ["climate.living", "sensor.outdoor_temp"],
|
|
296
300
|
series: [
|
|
297
|
-
{ entity: "climate.living", attribute: "current_temperature", label: "Indoor" }
|
|
301
|
+
{ entity: "climate.living", attribute: "current_temperature", label: "Indoor" },
|
|
302
|
+
{ entity: "sensor.grid_power", label: "Grid power", forced: false }
|
|
298
303
|
]
|
|
299
304
|
};
|
|
300
305
|
</script>
|
|
301
306
|
```
|
|
302
307
|
|
|
303
|
-
The entity picker lets users browse entity attributes and add/remove series at runtime. The attribute browser includes a local search field that finds top-level attributes, nested dotted paths, and primitive values inside attribute dictionaries. Non-default series are removable via chip buttons. Selected source chips can be dragged to reorder user-added graphs without refetching history; the chip order previews while dragging and is restored if the drag is cancelled.
|
|
308
|
+
The entity picker lets users browse entity attributes and add/remove series at runtime. The attribute browser includes a local search field that finds top-level attributes, nested dotted paths, and primitive values inside attribute dictionaries. Non-default series are removable via chip buttons. Configured series are fixed by default; set `forced: false` on a `SeriesConfig` to show it as a removable chip in the graph picker. Selected source chips can be dragged to reorder user-added graphs without refetching history; the chip order previews while dragging and is restored if the drag is cancelled.
|
|
304
309
|
|
|
305
310
|
### Viewer tools
|
|
306
311
|
|