Skip to content

Commit

Permalink
feat: rename name to label
Browse files Browse the repository at this point in the history
  • Loading branch information
bramstroker committed Jan 1, 2025
1 parent 5c336b1 commit ddbea19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source/library/custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You can add one or more custom fields to a profile by adding a `fields` section
{
"fields": {
"switch_entity": {
"name": "Switch entity",
"label": "Switch entity",
"description": "Select the switch entity for your device",
"selector": {
"entity": {
Expand All @@ -27,7 +27,7 @@ You can add one or more custom fields to a profile by adding a `fields` section
The key `switch_entity` is the key of the field. This can be referenced in the profile configuration using the `{{ switch_entity }}` syntax.
After setup Powercalc will replace this with the value the user provided.

`name` is the name of the field that will be shown to the user.
`label` is the label of the field that will be shown to the user.
`description` is optional and is shown to the user below the field.
`selector` is the type of field. The configuration is similar to [HA Blueprints](https://www.home-assistant.io/docs/blueprint/selectors/).

Expand All @@ -44,7 +44,7 @@ The profile then calculates the power usage based on the number provided.
"calculation_strategy": "composite",
"fields": {
"num_switches": {
"name": "Number of switches",
"label": "Number of switches",
"description": "Enter some number",
"selector": {
"number": {
Expand All @@ -71,7 +71,7 @@ The profile then calculates the power usage based on the state of the binary sen
"calculation_strategy": "composite",
"fields": {
"some_entity": {
"name": "Some entity",
"label": "Some entity",
"description": "Select some entity",
"selector": {
"entity": {
Expand Down

0 comments on commit ddbea19

Please sign in to comment.