diff --git a/docs/configuration.md b/docs/configuration.md index 71c238c4..aed25266 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -139,6 +139,7 @@ These attributes are only needed if `show_solar` is set to `true`. |--------------------|-------------|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | colour: | Optional | `'#5fb6ad'` | Sets the colour of all the load card objects. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc). | | off_colour: | Optional | `grey` | Sets the off colour for the additional essential loads. Set this to `transparent` to hide the load when power is below the `off_threshold` | +| max_colour: | Optional | | Sets the upper threshold colour for the additional essential loads. | | dynamic_colour: | Optional | `true` | The essential icon colour will change based on the % contribution of the power source (battery, grid, solar) supplying the load. Set to `false` to disable. | | dynamic_icon: | Optional | `true` | The essential icon will change when there is 100% contribution from a single power source (battery, grid, solar). Set to `false` to disable. | | invert_load: | Optional | `false` | Set to `true` if your sensor provides a negative number when the load is drawing power. | @@ -165,21 +166,27 @@ These attributes are only needed if `show_solar` is set to `true`. | load1_name: | Optional | | Set the display name for the essential load 1. | load1_icon: | Optional | none | Set the essential load 1 image using preset or any mdi icon e.g. `mdi:ev-station` Presets are: `boiler`, `pump`, `aircon`, `oven`. You can also provide a sensor that returns the mdi icon. | | load1_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 1 icon. +| load1_max_threshold: | Optional | | Set the threshold for the essential load 1 that will activate the `max_colour`. | load2_name: | Optional | | Set the display name for the essential load 2. | load2_icon: | Optional | none | Set the essential load 2 image using preset or any mdi icon e.g. `mdi:ev-station` Presets are: `boiler`, `pump`, `aircon`, `oven`. You can also provide a sensor that returns the mdi icon. | | load2_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 2 icon. +| load2_max_threshold: | Optional | | Set the threshold for the essential load 2 that will activate the `max_colour`. | load3_name: | Optional | | Set the display name for the essential load 3 (Lite/compact card only). | load3_icon: | Optional | none | Set the essential load 3 image using any mdi icon e.g. `mdi:ev-station` Presets are not available when showing 4 or more essential loads. You can also provide a sensor that returns the mdi icon. | | load3_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 3 icon. +| load3_max_threshold: | Optional | | Set the threshold for the essential load 3 that will activate the `max_colour`. | load4_name: | Optional | | Set the display name for the essential load 4. | load4_icon: | Optional | none | Set the essential load 4 image using any mdi icon e.g. `mdi:ev-station` Presets are not available when showing 4 or more essential loads. You can also provide a sensor that returns the mdi icon. | | load4_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 4 icon. +| load4_max_threshold: | Optional | | Set the threshold for the essential load 4 that will activate the `max_colour`. | load5_name: | Optional | | Set the display name for the essential load 5. | load5_icon: | Optional | none | Set the essential load 5 image using any mdi icon e.g. `mdi:ev-station` Presets are not available when showing 4 or more essential loads. You can also provide a sensor that returns the mdi icon. | | load5_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 5 icon. +| load5_max_threshold: | Optional | | Set the threshold for the essential load 5 that will activate the `max_colour`. | load6_name: | Optional | | Set the display name for the essential load 6. | load6_icon: | Optional | none | Set the essential load 6 image using any mdi icon e.g. `mdi:ev-station` Presets are not available when showing 4 or more essential loads. You can also provide a sensor that returns the mdi icon. | | load6_switch: | Optional | | Provide an entity that can be toggled when clicking on the essential load 6 icon. +| load6_max_threshold: | Optional | | Set the threshold for the essential load 6 that will activate the `max_colour`. | auto_scale: | Optional | `true` | If set to `true` the card will use the entities `unit_of_measurement` attribute to perform the correct scaling (i,e, power values greater than 999W will be displayed as kW e.g. 1.23kW) and display the correct unit. The number of decimal places can be changed using the `decimal_places` card attribute apart from the daily energy values which are set using the `decimal_places_energy` attribute. | | off_threshold: | Optional | `0` | When power falls below this value the load will be considered off and colour will change to grey. Requires `dynamic_colour` to be enabled. Can also be set to `-1` to disable. | | path_threshold: | Optional | `100` | Specify threshold to apply dynamic colour to the load path element. The colour of the path will change to the source colour if the percentage supply by a single source equals or exceeds this value. diff --git a/package.json b/package.json index e9b85522..568bcd2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sunsynk-power-flow-card", - "version": "6.4.3", + "version": "6.5.0", "description": "A customizable Home Assistant card to emulate the Sunsynk System flow that's displayed on the Inverter screen.", "main": "sunsynk-power-flow-card.js", "scripts": { diff --git a/src/editor.ts b/src/editor.ts index 5750d42a..66b9fc09 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -307,6 +307,7 @@ export class SunSynkCardEditor extends LitElement implements LovelaceCardEditor {name: 'auto_scale', selector: {boolean: {}}}, {name: 'colour', selector: {color_rgb: {}}}, {name: 'off_colour', selector: {color_rgb: {}}}, + {name: 'max_colour', selector: {color_rgb: {}}}, {name: 'dynamic_colour', selector: {boolean: {}}}, {name: 'dynamic_icon', selector: {boolean: {}}}, {name: 'invert_load', selector: {boolean: {}}}, @@ -315,28 +316,34 @@ export class SunSynkCardEditor extends LitElement implements LovelaceCardEditor {name: 'load1_name', selector: {text: {}}}, {name: 'load1_icon', selector: {icon: {}}}, {name: 'load1_switch', selector: {entity: {}}}, + {name: 'load1_max_threshold', selector: {number: {}}}, {name: 'load2_name', selector: {text: {}}}, {name: 'load2_icon', selector: {icon: {}}}, {name: 'load2_switch', selector: {entity: {}}}, + {name: 'load2_max_threshold', selector: {number: {}}}, {name: 'load3_name', selector: {text: {}}}, {name: 'load3_icon', selector: {icon: {}}}, {name: 'load3_switch', selector: {entity: {}}}, + {name: 'load3_max_threshold', selector: {number: {}}}, {name: 'load4_name', selector: {text: {}}}, {name: 'load4_icon', selector: {icon: {}}}, {name: 'load4_switch', selector: {entity: {}}}, + {name: 'load4_max_threshold', selector: {number: {}}}, {name: 'load5_name', selector: {text: {}}}, {name: 'load5_icon', selector: {icon: {}}}, {name: 'load5_switch', selector: {entity: {}}}, + {name: 'load5_max_threshold', selector: {number: {}}}, {name: 'load6_name', selector: {text: {}}}, {name: 'load6_icon', selector: {icon: {}}}, {name: 'load6_switch', selector: {entity: {}}}, + {name: 'load6_max_threshold', selector: {number: {}}}, {name: 'animation_speed', selector: {number: {}}}, {name: 'max_power', selector: {number: {}}}, {name: 'off_threshold', selector: {number: {}}}, {name: 'path_threshold', selector: {number: {}}}, {name: 'navigate', selector: {text: {}}}, - {name: 'invert_flow', selector: {boolean: {}}}, {name: 'label_daily_load', selector: {text: {}}}, + {name: 'invert_flow', selector: {boolean: {}}}, ], }, { diff --git a/src/index.ts b/src/index.ts index 153a0f03..ce628d3b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -280,12 +280,19 @@ export class SunsynkPowerFlowCard extends LitElement { const auxOffColour = this.colourConvert(config.load?.aux_off_colour || auxDynamicColour); const auxDynamicColourLoad1 = this.calculateAuxLoadColour(stateAuxLoad1.toPower(false), Utils.toNum(config.load?.off_threshold, 0)) || loadColour; const auxDynamicColourLoad2 = this.calculateAuxLoadColour(stateAuxLoad2.toPower(false), Utils.toNum(config.load?.off_threshold, 0)) || loadColour; - const dynamicColourEssentialLoad1 = this.calculateEssentialLoadColour(stateEssentialLoad1.toPower(false), Utils.toNum(config.load?.off_threshold, 0)) || loadColour; - const dynamicColourEssentialLoad2 = this.calculateEssentialLoadColour(stateEssentialLoad2.toPower(false), Utils.toNum(config.load?.off_threshold, 0)) || loadColour; - const dynamicColourEssentialLoad3 = this.calculateEssentialLoadColour(stateEssentialLoad3.toPower(false), Utils.toNum(config.load?.off_threshold, 0)) || loadColour; - const dynamicColourEssentialLoad4 = this.calculateEssentialLoadColour(stateEssentialLoad4.toPower(false), Utils.toNum(config.load?.off_threshold, 0)) || loadColour; - const dynamicColourEssentialLoad5 = this.calculateEssentialLoadColour(stateEssentialLoad5.toPower(false), Utils.toNum(config.load?.off_threshold, 0)) || loadColour; - const dynamicColourEssentialLoad6 = this.calculateEssentialLoadColour(stateEssentialLoad6.toPower(false), Utils.toNum(config.load?.off_threshold, 0)) || loadColour; + const threshold = Utils.toNum(config.load?.off_threshold, 0); + const Load1MaxThreshold = Utils.toNum(config.load?.load1_max_threshold, 0) || Infinity; + const Load2MaxThreshold = Utils.toNum(config.load?.load2_max_threshold, 0) || Infinity; + const Load3MaxThreshold = Utils.toNum(config.load?.load3_max_threshold, 0) || Infinity; + const Load4MaxThreshold = Utils.toNum(config.load?.load4_max_threshold, 0) || Infinity; + const Load5MaxThreshold = Utils.toNum(config.load?.load5_max_threshold, 0) || Infinity; + const Load6MaxThreshold = Utils.toNum(config.load?.load6_max_threshold, 0) || Infinity; + const dynamicColourEssentialLoad1 = this.calculateEssentialLoadColour(stateEssentialLoad1.toPower(false), threshold, Load1MaxThreshold) || loadColour; + const dynamicColourEssentialLoad2 = this.calculateEssentialLoadColour(stateEssentialLoad2.toPower(false), threshold, Load2MaxThreshold) || loadColour; + const dynamicColourEssentialLoad3 = this.calculateEssentialLoadColour(stateEssentialLoad3.toPower(false), threshold, Load3MaxThreshold) || loadColour; + const dynamicColourEssentialLoad4 = this.calculateEssentialLoadColour(stateEssentialLoad4.toPower(false), threshold, Load4MaxThreshold) || loadColour; + const dynamicColourEssentialLoad5 = this.calculateEssentialLoadColour(stateEssentialLoad5.toPower(false), threshold, Load5MaxThreshold) || loadColour; + const dynamicColourEssentialLoad6 = this.calculateEssentialLoadColour(stateEssentialLoad6.toPower(false), threshold, Load6MaxThreshold) || loadColour; config.title_colour = this.colourConvert(config.title_colour); @@ -992,10 +999,9 @@ export class SunsynkPowerFlowCard extends LitElement { } } - const totalDayBatteryDischarge = stateDayBatteryDischarge.toNum() + stateDayBattery2Discharge.toNum(); - const totalDayBatteryCharge = stateDayBatteryCharge.toNum() + stateDayBattery2Charge.toNum(); + //Autarky in Percent = Home Production / Home Consumption //Ratio in Percent = Home Consumption / Home Production const productionEnergy = stateDayPVEnergy.toNum() + totalDayBatteryDischarge; @@ -1003,30 +1009,54 @@ export class SunsynkPowerFlowCard extends LitElement { const autarkyEnergy = consumptionEnergy != 0 ? Math.max(Math.min(Math.round((productionEnergy * 100) / consumptionEnergy), 100), 0) : 0; const ratioEnergy = productionEnergy != 0 ? Math.max(Math.min(Math.round((consumptionEnergy * 100) / productionEnergy), 100), 0) : 0; + //const productionPower = + // totalPV + + // Utils.toNum(`${(config.battery.invert_flow === true ? batteryPowerTotal < 0 : batteryPowerTotal > 0) ? Math.abs(batteryPowerTotal) : 0}`) + + // Utils.toNum(`${auxPower < 0 ? auxPower * -1 : 0}`); + const productionPower = totalPV + - Utils.toNum(`${(config.battery.invert_flow === true ? batteryPowerTotal < 0 : batteryPowerTotal > 0) ? Math.abs(batteryPowerTotal) : 0}`) + - Utils.toNum(`${auxPower < 0 ? auxPower * -1 : 0}`); + (config.battery.invert_flow === true + ? (batteryPowerTotal < 0 ? Math.abs(batteryPowerTotal) : 0) + : (batteryPowerTotal > 0 ? Math.abs(batteryPowerTotal) : 0)) + + (auxPower < 0 ? Math.abs(auxPower) : 0); + //console.log(`Production Data`); //console.log(`P_Solar Power:${totalPV}`); - //console.log(`P_Battery Power:${Utils.toNum(`${batteryPower > 0 ? batteryPower : 0}`)}`); - //console.log(`P_Aux Power:${Utils.toNum(`${auxPower < 0 ? auxPower * -1 : 0}`)}`); + //console.log(`P_Battery Power: ${(config.battery.invert_flow === true + // ? (batteryPowerTotal < 0 ? Math.abs(batteryPowerTotal) : 0) + // : (batteryPowerTotal > 0 ? Math.abs(batteryPowerTotal) : 0))}`); + //console.log(`P_Aux Power:${(auxPower < 0 ? auxPower * -1 : 0)}`); //console.log(`Production Total:${productionPower}`); + //const consumptionPower = + // essentialPower + + // Math.max(nonessentialPower, 0) + + // Utils.toNum(`${auxPower > 0 ? auxPower : 0}`) + + // Utils.toNum(`${(config.battery.invert_flow === true ? batteryPowerTotal > 0 : batteryPowerTotal < 0) ? Math.abs(batteryPowerTotal) : 0}`); + const consumptionPower = essentialPower + Math.max(nonessentialPower, 0) + - Utils.toNum(`${auxPower > 0 ? auxPower : 0}`) + - Utils.toNum(`${(config.battery.invert_flow === true ? batteryPowerTotal > 0 : batteryPowerTotal < 0) ? Math.abs(batteryPowerTotal) : 0}`); + (auxPower > 0 ? auxPower : 0) + + (config.battery.invert_flow === true + ? (batteryPowerTotal > 0 ? Math.abs(batteryPowerTotal) : 0) + : (batteryPowerTotal < 0 ? Math.abs(batteryPowerTotal) : 0)); + //console.log(`Consumption Data`); //console.log(`C_Essential Power:${essentialPower}`); //console.log(`C_NonEssential Power:${nonessentialPower}`); - //console.log(`C_Battery Power:${Utils.toNum(`${batteryPower < 0 ? batteryPower * -1 : 0}`)}`); - //console.log(`C_Aux Power:${Utils.toNum(`${auxPower > 0 ? auxPower : 0}`)}`); - //console.log(`C_Consumption Total:${consumptionPower}`); + //console.log(`C_Battery Power:${(config.battery.invert_flow === true + // ? (batteryPowerTotal > 0 ? Math.abs(batteryPowerTotal) : 0) + // : (batteryPowerTotal < 0 ? Math.abs(batteryPowerTotal) : 0))}`); + //console.log(`C_Aux Power:${(auxPower > 0 ? auxPower : 0)}`); + //console.log(`Consumption Total:${consumptionPower}`); const autarkyPower = consumptionPower != 0 ? Math.max(Math.min(Math.round((productionPower * 100) / consumptionPower), 100), 0) : 0; const ratioPower = productionPower != 0 ? Math.max(Math.min(Math.round((consumptionPower * 100) / productionPower), 100), 0) : 0; + + //console.log(`Autarky: ${autarkyPower}`); + //console.log(`Ratio: ${ratioPower}`); const maxLineWidth = (Utils.toNum(config.max_line_width) < 1 ? 1 : config.max_line_width) - 1; const minLineWidth = Utils.toNum(config.min_line_width) || 1; @@ -1783,12 +1813,32 @@ export class SunsynkPowerFlowCard extends LitElement { : 'grey'; } - calculateEssentialLoadColour(state, threshold) { - return !this._config.load.dynamic_colour - ? this.colourConvert(this._config.load?.colour) - : Math.abs(state) > threshold - ? this.colourConvert(this._config.load?.colour) - : this.colourConvert(this._config.load?.off_colour) || 'grey'; + //calculateEssentialLoadColour(state, threshold) { + // return !this._config.load.dynamic_colour + // ? this.colourConvert(this._config.load?.colour) + // : Math.abs(state) > threshold + // ? this.colourConvert(this._config.load?.colour) + // : this.colourConvert(this._config.load?.off_colour) || 'grey'; + //} + + calculateEssentialLoadColour(state: number, threshold: number, maxThreshold: number): string { + if (!this._config.load.dynamic_colour) { + // If dynamic colour is disabled, return the default colour + return this.colourConvert(this._config.load?.colour); + } + + if (Math.abs(state) > maxThreshold) { + // If the state exceeds the max threshold, return the max colour + return this.colourConvert(this._config.load?.max_colour); + } + + if (Math.abs(state) > threshold) { + // If the state exceeds the regular threshold, return the default colour + return this.colourConvert(this._config.load?.colour); + } + + // If the state is below the threshold, return the off colour or grey + return this.colourConvert(this._config.load?.off_colour) || 'grey'; } setConfig(config) { diff --git a/src/localize/languages/ca.json b/src/localize/languages/ca.json index 7ce52b95..73ab9f22 100644 --- a/src/localize/languages/ca.json +++ b/src/localize/languages/ca.json @@ -196,6 +196,13 @@ "invert_flow": "Invert Flow", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Opcions Títol", "general": "Opcions Generals", diff --git a/src/localize/languages/cs.json b/src/localize/languages/cs.json index 774314a1..d58a7e31 100644 --- a/src/localize/languages/cs.json +++ b/src/localize/languages/cs.json @@ -197,6 +197,13 @@ "label_daily_load": "Daily Load Label", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/da.json b/src/localize/languages/da.json index a40f7871..1da36c50 100644 --- a/src/localize/languages/da.json +++ b/src/localize/languages/da.json @@ -197,6 +197,13 @@ "label_daily_load": "Daily Load Label", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Titel Options", "general": "Generelle Options", diff --git a/src/localize/languages/de.json b/src/localize/languages/de.json index e68f6001..95ee01e9 100644 --- a/src/localize/languages/de.json +++ b/src/localize/languages/de.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/en.json b/src/localize/languages/en.json index 0b97994c..3565c52f 100644 --- a/src/localize/languages/en.json +++ b/src/localize/languages/en.json @@ -197,6 +197,13 @@ "label_daily_load": "Daily Load Label", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/es.json b/src/localize/languages/es.json index d79d3024..736bbfe7 100644 --- a/src/localize/languages/es.json +++ b/src/localize/languages/es.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/et.json b/src/localize/languages/et.json index 5fb21d84..d44564d4 100644 --- a/src/localize/languages/et.json +++ b/src/localize/languages/et.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/fr.json b/src/localize/languages/fr.json index 2e91ea8d..fba786a6 100644 --- a/src/localize/languages/fr.json +++ b/src/localize/languages/fr.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/it.json b/src/localize/languages/it.json index 4cf36d15..a3ba765f 100644 --- a/src/localize/languages/it.json +++ b/src/localize/languages/it.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/nl.json b/src/localize/languages/nl.json index cb6cc253..d8f76581 100644 --- a/src/localize/languages/nl.json +++ b/src/localize/languages/nl.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/pt-br.json b/src/localize/languages/pt-br.json index 713c7147..1c7217d7 100644 --- a/src/localize/languages/pt-br.json +++ b/src/localize/languages/pt-br.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Opções de título", "general": "Opções gerais", diff --git a/src/localize/languages/ru.json b/src/localize/languages/ru.json index e0349d1a..62ec3635 100644 --- a/src/localize/languages/ru.json +++ b/src/localize/languages/ru.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Параметры Заголовка", "general": "Общие Настройки", diff --git a/src/localize/languages/sk.json b/src/localize/languages/sk.json index 71c21f1a..af0d918a 100644 --- a/src/localize/languages/sk.json +++ b/src/localize/languages/sk.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Title Options", "general": "General Options", diff --git a/src/localize/languages/sv.json b/src/localize/languages/sv.json index 852c5733..ff502d13 100644 --- a/src/localize/languages/sv.json +++ b/src/localize/languages/sv.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Titelalternativ", "general": "Allmänna Alternativ", diff --git a/src/localize/languages/uk.json b/src/localize/languages/uk.json index 6973db23..8979d81e 100644 --- a/src/localize/languages/uk.json +++ b/src/localize/languages/uk.json @@ -197,6 +197,13 @@ "wide": "Wide Screen Layout", "remaining_energy_to_shutdown": "Remaining Energy to Shutdown", "off_colour": "Off Colour", + "load1_max_threshold": "Load 1 Max Threshold", + "load2_max_threshold": "Load 2 Max Threshold", + "load3_max_threshold": "Load 3 Max Threshold", + "load4_max_threshold": "Load 4 Max Threshold", + "load5_max_threshold": "Load 5 Max Threshold", + "load6_max_threshold": "Load 6 Max Threshold", + "max_colour": "Max Colour", "cat_title": { "title": "Параметри Заголовка", "general": "Загальні Параметри", diff --git a/src/types.ts b/src/types.ts index 68164fa1..f6674f31 100644 --- a/src/types.ts +++ b/src/types.ts @@ -159,6 +159,13 @@ export interface sunsynkPowerFlowCardConfig extends LovelaceCardConfig { aux_colour: string; aux_off_colour: string; off_threshold: number; + load1_max_threshold: number; + load2_max_threshold: number; + load3_max_threshold: number; + load4_max_threshold: number; + load5_max_threshold: number; + load6_max_threshold: number; + max_colour: string; additional_loads: number; aux_loads: number; aux_load1_name: string;