You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename project to Power Flow Live and add new features
- Rename system-flow-card to power-flow-live across all files, classes, and config
- Replace global fadeIdylElements with per-element fade option (never/no-flow/unavailable)
- Add configurable sizing options: boxSize, iconSize, valueFontSize, extraFontSize, sideExtraFontSize
- Update README with new documentation and upstream credits

7
-
8
-
This card for [Home Assistant](https://home-assistant.io/) Dashboards is designed to provide system distribution in an identical style to the Official Energy Distribution card included by Home Assistant.
3
+
A custom [Home Assistant](https://home-assistant.io/) Lovelace card that visualises live power flow with animated dots, inspired by the official Energy Distribution card.
9
4
10
5
<imgwidth="454"alt="Screenshot 2023-02-17 at 1 46 52 AM"src="https://user-images.githubusercontent.com/14035884/219596902-40d68252-fa60-49ef-a354-f14d8a89b1a3.png">
11
6
12
-
## Install
13
-
14
-
### HACS (recommended)
15
-
16
-
This card is available in [HACS](https://hacs.xyz/) (Home Assistant Community Store).
17
-
<small>_HACS is a third party community store and is not included in Home Assistant out of the box._</small>
18
-
19
7
### Manual install
20
8
21
-
1. Download and copy `system-flow-card.js` from the [latest release](https://github.com/flyrmyr/system-flow-card/releases/latest) into your `config/www` directory.
9
+
1. Download and copy `power-flow-live.js` from the [latest release](https://github.com/mathewgreen/power-flow-live/releases/latest) into your `config/www` directory.
22
10
23
11
2. Add the resource reference as decribed below.
24
12
25
13
### Add resource reference
26
14
27
-
If you configure Dashboards via YAML, add a reference to `system-flow-card.js` inside your `configuration.yaml`:
15
+
If you configure Dashboards via YAML, add a reference to `power-flow-live.js` inside your `configuration.yaml`:
28
16
29
17
```yaml
30
18
resources:
31
-
- url: /local/system-flow-card.js
19
+
- url: /local/power-flow-live.js
32
20
type: module
33
21
```
34
22
@@ -39,8 +27,8 @@ Else, if you prefer the graphical editor, use the menu to add the resource:
39
27
3. Click three dot icon
40
28
4. Select Resources
41
29
5. Hit (+ ADD RESOURCE) icon
42
-
6. Enter URL `/local/system-flow-card.js` and select type "JavaScript Module".
43
-
(Use `/hacsfiles/system-flow-card/system-flow-card.js` and select "JavaScript Module" for HACS install if HACS didn't do it already)
30
+
6. Enter URL `/local/power-flow-live.js` and select type "JavaScript Module".
31
+
(Use `/hacsfiles/power-flow-live/power-flow-live.js` and select "JavaScript Module" for HACS install if HACS didn't do it already)
44
32
45
33
## Using the card
46
34
@@ -53,12 +41,16 @@ I recommend looking at the [Example usage section](#example-usage) to understand
| type | `string` | **required** | `custom:system-flow-card`.
44
+
| type | `string` | **required** | `custom:power-flow-live`.
57
45
| title | `string` | | Shows a title at the top of the card.
58
46
| system | `object` | | Define parameters of the central `System` element, see [system object](#system-object) for additional system element options.
59
47
| elements | `object` | **required** | One or more sensor entities, see [element object](#element-object) for additional entity options.
60
-
| speed | `string` | 5 | Define the average time (s) for dots to travel.
61
-
| fadeIdylElements | `string` | | Fade elements that are not currently producing or consuming.
48
+
| speed | `number` | `5` | Average time (s) for dots to travel.
49
+
| boxSize | `number` | `80` | Size (px) of each element box.
50
+
| iconSize | `number` | `24` | Size (px) of icons inside element boxes.
51
+
| valueFontSize | `number` | `12` | Font size (px) for the main value text in element boxes.
52
+
| extraFontSize | `number` | `10` | Font size (px) for the extra main sensor text.
53
+
| sideExtraFontSize | `number` | `10` | Font size (px) for the left/right extra sensor text.
62
54
63
55
#### System object
64
56
The system is essentially an [element object](#element-object). The `value` is calculated from the difference in providers and consumers in the system (a positive value shows net unaccounted for production). This element has a central position.
@@ -85,6 +77,7 @@ The system is essentially an [element object](#element-object). The `value` is c
85
77
| fill | `string` | | Entity ID of a sensor providing a state of 0 - 100 (%) fill of the element box
86
78
| invert | `boolean` | false | Invert element value for the system flow calculation
87
79
| exclude | `boolean` | false | Exclude element value from the system flow calculation
80
+
| fade | `string` | `never` | Controls when the element fades out. `never`: never fade. `no-flow`: fade when power flow is zero. `unavailable`: fade only when the entity is unavailable/unknown.
88
81
| extra | `object` | | Extra sensor values to display within the element box. See [element extra object](#element-extra-object) for additional extra options.
89
82
90
83
#### Element value object
@@ -109,9 +102,12 @@ The system is essentially an [element object](#element-object). The `value` is c
- [HA Energy Distribution Card](https://www.home-assistant.io//dashboards/energy/#energy-distribution)
174
+
This project is a fork of [samuelolteanu/system-flow-card](https://github.com/samuelolteanu/system-flow-card), which was itself forked from [flyrmyr/system-flow-card](https://github.com/flyrmyr/system-flow-card).
175
+
176
+
- [flyrmyr](https://github.com/flyrmyr/system-flow-card) — original System Flow Card
0 commit comments