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
{{ message }}
Repository navigation
Commit 0e26e47
Browse filesBrowse the repository at this point in the historyBrowse files
## Added
**Devices and labels are now unlimited!**
Important: you must increase the size of the card to see more labels/devices. Just adding them to the card configuration / YAML is not enough, the card hides them if rows/column minimums aren't met.
Cap limits are in place for the default size of the card (12 columns, 3 rows): 2 Grid, 2 Battery, 4 PV labels, 8 Devices.
Note: There are of course theoretical limits due to the size of the cards which I cannot really avoid without making the UI tiny. In testing I am seeing 8 devices and PV labels for every 12 columns used, in theory grid and battery labels should be unlimited if you keep growing the card height.
Another Note: On small screens (phones), the width of wide cards is squeezed small - in this case a max of 8 PV labels or devices will be shown in the UI.
Reminder: Card resizing is [managed using sections](https://github.com/pacemaker82/Compact-Power-Card#managing-the-size-of-the-card).
**Your mileage may vary with this change. It can lead to overlapping labels and other undesirable effects as there are so many possible scenarios that I can't really control.**
## Other Changes
- `curve_factor` updated to support 0-5 range.
- `curved_lines` is now deprecated. Use `curve_factor: 0` for same effect.
- Refactored all geometry across render and update to remove duplication.
Copy file name to clipboardExpand all lines: README.md
+36-18Lines changed: 36 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,16 @@
4
4
5
5
<imgwidth="1043"height="640"alt="Screenshot 2025-12-24 at 07 39 40"src="https://github.com/user-attachments/assets/583dde65-2885-4cfb-8db0-d91a9ec7c580" />
6
6
7
-
Inspired by the excellent [power flow card plus](https://github.com/flixlix/power-flow-card-plus) - A compact power card for Home Assistant that supports a tighter user experience, and 8 power devices/feeds from the home in a single card. In addition, the card can show up to 8 entity labels for whatever you want, colour and configure them how you need.
7
+
Inspired by the excellent [power flow card plus](https://github.com/flixlix/power-flow-card-plus) - A compact power card for Home Assistant that supports a tighter user experience, labels and power devices in the home in a single card. Various elements are very customisable, see below for more.
8
8
9
9
## Functionality
10
10
11
-
-Up to 8 device power entities for the home that can help calculate the rest of home usage
12
-
-Up to 8 additional state labels to show related info, like battery %, grid voltage, PV energy or whatever you want.
11
+
-Add Device power entities for the home that can help calculate the rest of home usage
12
+
-Add labels to show related info, like battery %, grid voltage, PV energy or whatever you want.
13
13
- Thresholds can be set on entities to fade out the entity label below the threshold.
14
14
- Home power is calculated by default based on the grid/power/battery. Alternatively, use a home power sensor.
15
15
- Home icon dynamically changes colour based on the power provided to it.
16
-
- Grid & Battery sensors expect +/- values for import/export or charge/discharge. These can be inverted if the default behaviour isn't what you want.
16
+
- Grid & Battery sensors expect +/- values for import/export or charge/discharge. These can be inverted if the default behaviour isn't what you want. You can also provide separate import/export and charge/discharge entities.
17
17
- Icons, colors and units can be customised.
18
18
19
19
## Installation
@@ -33,7 +33,6 @@ Before you dive in getting a complicated card all setup, start with the basics.
33
33
34
34
```yaml
35
35
type: custom:compact-power-card
36
-
curved_lines: true
37
36
curve_factor: 1
38
37
entities:
39
38
pv:
@@ -46,13 +45,15 @@ entities:
46
45
47
46
## Managing the size of the card
48
47
49
-
This card is designed for the new [Home Assistant Sections UI](https://www.home-assistant.io/dashboards/sections/), introduced in 2024. This allows you to scale the card horizontally or vertically as you see fit. The card will dynamically resize to fit the rows and columns you setup in the card UI:
48
+
This card is designed for the new [Home Assistant Sections UI](https://www.home-assistant.io/dashboards/sections/), introduced in 2024. This allows you to scale the card horizontally or vertically as you see fit. The card will dynamically resize to fit the rows and columns you setup in the card UI.
49
+
50
+
**Note:** Caps are in place for the default size of the card (12 columns, 3 rows): 2 Grid, 2 Battery, 4 PV labels, 8 Devices.
**Note:** All of these settings are available in the configuration UI, details here for reference.
56
+
**Note:** All of these settings are available in the configuration UI (unless mentioned otherwise), details here for reference.
56
57
57
58
## Card-level
58
59
@@ -62,8 +63,7 @@ This card is designed for the new [Home Assistant Sections UI](https://www.home-
62
63
| Decimal places | `decimal_places`| Default decimal places for all labels/values unless overridden at the entity/label level. |
63
64
| Subtract devices from home | `subtract_devices_from_home` | If true, subtract summed devices from the home value. Default: `false`. |
64
65
| Power Unit Override | `power_unit`| Set to W, kW or mW |
65
-
| Show curved lines? | `curved_lines`| Set to `false` if you want a more straight-edge look. Default `true` |
66
-
| Curved Line Radius | `curve_factor`| Adjusts the curve radius. `1` to `5`, `1` is default. Only works when `curved_lines: true` |
66
+
| Curved Line Radius | `curve_factor`| Adjusts the curve radius. `0` to `5`, `1` is default. Set to `0` for straight lines. |
67
67
| Device Power Lines | `show_device_power_lines`| Set to `true` to light up devices when power is flowing beyond a threshold. Default `false` |
68
68
| Home Icon Gradient | `disable_home_gradient`| Set to `true` if you want the home icon to be a single colour. |
69
69
| Remove Glow Effects | `remove_glow_effects`| Set to `true` to disable drop shadow/glow effects. Default `false` (dark mode only). |
@@ -85,7 +85,6 @@ Example:
85
85
```yaml
86
86
type: custom:compact-power-card
87
87
threshold_mode: display_only
88
-
curved_lines: true
89
88
curve_factor: 5
90
89
```
91
90
@@ -99,27 +98,27 @@ Common keys for `pv`, `grid`, `home`, `battery`. The following settings are poss
99
98
| Threshold | `threshold` | Values below this are zeroed (per `threshold_mode`) and dimmed. |
100
99
| Decimals | `decimal_places` | Number of decimals to display (defaults to card-level `decimal_places`, or 1). |
101
100
| Unit override | `unit` / `unit_of_measurement` | Converts `W` to `kW` if set to `kW` |
102
-
| Invert state values | `invert_state_values` | Flip sign of grid/battery readings (e.g., import/export, charge/discharge). |
101
+
| Invert state values | `invert_state_values` | Flip positive/negative for the grid/battery readings |
103
102
| Tap Action | `tap_action` | Set to `more-info` or `navigate`. `navigate` requires a `navigation_path`. Default behaviour is `more-info` |
104
103
| Navigation Path | `navigation_path` | Used with `tap_action: navigate`. Set to a local path to go to a dashboard, e.g. `/my-dashboard/page` |
105
104
106
105
### Separate Entities for Grid or Battery:
107
106
108
107
If you don't have a single entity for grid or battery power, you can instead use separate entities for both. This is not part of the configuration UI, it can only be added as YAML manually to the card.
| Charge Entity | `charge_entity` | Sensor defining the charge power to the battery. |
122
-
| Discharge Entity | `discharge_entity` | Sensor defining the discharge power from the battery. |
121
+
| Discharge Entity | `discharge_entity` | Sensor defining the discharge power from the battery. |
123
122
124
123
Example:
125
124
@@ -170,7 +169,7 @@ The card supports many combinations: PV/Grid/Home/Battery, PV/Grid/Home, Battery
170
169
171
170
### Supporting multiple batteries
172
171
173
-
The card will support more than 1 battery, this is experimental at the moment. Each battery can have a soc and capacity entity too.
172
+
The card can support more than 1 battery. Each battery can have a soc and capacity entity too.
174
173
175
174
The UI will calculate your % of battery available across multiple batteries. If you just provide the `battery_soc` it will be an average across the SoCs. If you also provide the `battery_capacity` it will calculate a weighted average across the batteries.
176
175
@@ -193,10 +192,12 @@ entities:
193
192
194
193
## Devices
195
194
196
-
Devices are up to 8 power feeds within your home that you want to show in the card. By default, device power is not subtracted from the home power value. If you want that to happen, set the card-level `subtract_devices_from_home: true`.
195
+
Devices are power feeds within your home that you want to show in the card. By default, device power is not subtracted from the home power value. If you want that to happen, set the card-level `subtract_devices_from_home: true`.
197
196
198
197
**Important:** Any entity can be used in the device section to show icon/label, but only entities with `device_class: power` will be subtracted from the home power if `subtract_devices_from_home: true`. In addition, only devices with `device_class: power` will show power flow lines in the devices section.
199
198
199
+
**Important:** You can add as many devices as you want, however the display of them is determined by the card width, 12 columns = up to 8 devices, 24 columns = up to 16 devices. On small screens (phones) this will still be limited to 8 devices, unless in landscape mode where you should have more real estate.
| Device entity | `entity` | Sensor/entity id for a load. |
@@ -220,6 +221,7 @@ Example below of how devices can be setup:
220
221
threshold: 50
221
222
color: "#FFFFFF"
222
223
switch_entity: switch.car_charger
224
+
name: Polestar
223
225
- entity: sensor.pool_pump_power
224
226
icon: mdi:pool
225
227
threshold: 50
@@ -231,11 +233,13 @@ Example below of how devices can be setup:
231
233
232
234
## Labels (per pv/grid/battery)
233
235
234
-
Labels can be used to display "other" information - that can be more power stats, energy stats, weather, whatever you want. You can add up to four PV labels and two grid labels (plus battery labels separately). Note: these are just labels, they do not factor into the power diagram or calculations at all.
236
+
Labels can be used to display "other" information - that can be more power stats, energy stats, weather, whatever you want. Note: these are just labels, they do not factor into the power diagram or calculations at all.
237
+
238
+
**Important:** You can add as many labels as you want, however the display of them is determined by the card size width and height. Defaults for a 12 column, 3 row card are 2 labels for grid and battery, 4 labels for PV. Max 8 labels for PV on small screens like phones, the rest are hidden.
| Labels list | `labels` | Array (max 4 for PV, max 2 for grid) of label objects. |
242
+
| Labels list | `labels` | Array of labels objects. |
239
243
| Label entity | `entity` | Sensor/entity id for the label value. |
240
244
| Label attribute | `attribute` | Read from an attribute instead of state. |
241
245
| Label name | `name` | PV only. Add a name to the label. Ensure card is >= 4 rows in height. |
@@ -274,6 +278,20 @@ Battery labels are setup differently (due to the nature of supporting multi-batt
274
278
- entity: sensor.my_sensor
275
279
```
276
280
281
+
## A specific note on unlimited devices and labels...
282
+
283
+
**Important:** you must increase the size of the card to see more labels/devices. Just adding them to the card configuration / YAML is not enough, the card hides them if rows/column minimums aren't met.
284
+
285
+
There are cap limits are in place for the default size of the card (12 columns, 3 rows): 2 Grid, 2 Battery, 4 PV labels, 8 Devices.
286
+
287
+
**Note:** There are of course theoretical limits due to the size of the cards which I cannot really avoid without making the UI tiny. In testing I am seeing 8 devices and PV labels for every 12 columns used, in theory grid and battery labels should be unlimited if you keep growing the card height.
288
+
289
+
**Another Note:** On small screens (phones), the width of wide cards is squeezed small - in this case a max of 8 PV labels or devices will be shown in the UI.
290
+
291
+
**Reminder:** Card resizing is [managed using sections](https://github.com/pacemaker82/Compact-Power-Card#managing-the-size-of-the-card).
292
+
293
+
**Your mileage may vary with limitless labels and devices. It can lead to overlapping labels or other undesirable effects as there are so many possible scenarios that I can't really control.**
294
+
277
295
## Unit & Formatting behavior
278
296
- W values auto-convert to kW when ≥ 1000 W, unless `power_unit` is forcing to `W`.
0 commit comments