Skip to content

Commit

Permalink
code refactor & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Codegnosis committed Jan 22, 2024
1 parent 844d2d3 commit cd84430
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 458 deletions.
7 changes: 7 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ export const CUSTOM_DOD = 100.0;
export const CALCULATE_RESERVE_FROM_DOD = false;

export const DISPLAY_CUSTOM_DOD_STATS = true;

export const DISPLAY_UNITS = {
W: "W",
KW: "kW",
WH: "Wh",
KWH: "kWh",
}
2 changes: 1 addition & 1 deletion src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class GivTCPBatteryCardEditor extends LitElement implements LovelaceCardE
},
{
name: 'display_type',
label: 'Display type (0: Wh | 1: kWh | 2: Dynamic)',
label: 'Display type (0: Wh/W | 1: kWh/kW | 2: Dynamic)',
default: defaults.display_type,
selector: {
number: {
Expand Down
Loading

0 comments on commit cd84430

Please sign in to comment.