Skip to content

Commit 96927e1

Browse files
authored
Merge pull request #45 from MindFreeze/feat/28
v1.0.0
2 parents 8028d3e + ac84112 commit 96927e1

File tree

5 files changed

+547
-325
lines changed

5 files changed

+547
-325
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ This card is intended to display connections between entities with numeric state
4444
| ----------------- | ------- | ------------ | ------------------- | ------------------------------------------- |
4545
| entity_id | string | **Required** | | Entity id of the sensor
4646
| attribute | string | **Optional** | | Use the value of an attribute instead of the state of the entity. unit_of_measurement and id will still come from the entity. For more complex customization, please use HA templates.
47-
| type | string | **Optional** | entity | Don't worry about it. Will be used in the future
48-
| children | list | **Optional** | | List of entity ids describing child entities (branches). Only entities from subsequent sections will be connected.
47+
| type | string | **Optional** | entity | Possible values are 'entity', 'passthrough', 'remaining_parent_state', 'remaining_child_state'. See [entity types](#entity-types)
48+
| children | list | **Optional** | | List of entity ids describing child entities (branches). Only entities in subsequent sections will be connected.
4949
| name | string | **Optional** | entity name from HA | Custom label for this entity
5050
| color | string | **Optional** | var(--primary-color)| Color of the box
5151
| color_on_state | boolean | **Optional** | false | Color the box based on state value
@@ -61,8 +61,36 @@ This card is intended to display connections between entities with numeric state
6161
| name | string | **Required** | | Label for this entity. For example 'Other'
6262
| color | string | **Optional** | var(--primary-color) | Color of the box
6363

64+
### Entity types
65+
6466
## Examples
6567

68+
- `entity` - The default value, representing an entity from HA
69+
- `passthrough` - Used for connecting entities across sections, passing through intermediate sections. The card creates such passtroughs automatically when needed but you can create them manually in order to have the connection pass through a specific place. See issue [#9](https://github.com/MindFreeze/ha-sankey-chart/issues/9). Here is an example passthrough config:
70+
71+
```yaml
72+
- entity_id: sensor.child_sensor
73+
type: passthrough
74+
children:
75+
- sensor.child_sensor #Note that the child sensor has itself as a single child
76+
```
77+
78+
- `remaining_parent_state` - Used for representing the unaccounted state from this entity's parent. Formerly known as the `remaining` configuration. Useful for displaying the unmeasured state as "Other". See issue [#2](https://github.com/MindFreeze/ha-sankey-chart/issues/2) & [#28](https://github.com/MindFreeze/ha-sankey-chart/issues/28). Example:
79+
80+
```yaml
81+
- entity_id: whatever # as long as it is unique
82+
type: remaining_parent_state
83+
name: Other
84+
```
85+
86+
- `remaining_child_state` - Used for representing the unaccounted state in this entity's children. Like `remaining_parent_state` but in reverse. Useful for displaying discrepancies where the children add up to more than the parent. See issue [#2](https://github.com/MindFreeze/ha-sankey-chart/issues/2) & [#15](https://github.com/MindFreeze/ha-sankey-chart/issues/15). Example:
87+
88+
```yaml
89+
- entity_id: whatever # as long as it is unique
90+
type: remaining_child_state
91+
name: Discrepancy
92+
```
93+
6694
### Simple
6795

6896
![Simple example card](img/example-simple.png)

0 commit comments

Comments
 (0)