Skip to content

Commit

Permalink
feat: add Azzurro inverter image
Browse files Browse the repository at this point in the history
  • Loading branch information
slipx06 committed Mar 26, 2024
1 parent e379e27 commit 6ea9a51
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
10 changes: 5 additions & 5 deletions dist/sunsynk-power-flow-card.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The card can be configured through the following attributes:
| modern: | Optional | `true` | Display the inverter using the modern image. Set to `false` to display an image of the inverter based on the `model` attribute below. |
| colour: | Optional | `grey` | Sets the colour of the inverter and data. Hex codes (`'#66ff00'` etc) or names (`red`, `green`, `blue` etc) |
| autarky: | Optional | `power` | Display autarky and ratio as a percentage using either realtime power or daily energy values. Set to `no` to hide (`energy/power/no`). <br />Autarky is the percentage of self sufficiency through Home Production. Ratio is the percentage of produced electricity used by the home. <br />It is calculated based on the formula below and borrowed from the [Power Distribution Card](https://github.com/JonahKr/power-distribution-card) <br /><ul><li>Autarky in Percent = Home Production / Home Consumption </li><li>Ratio in Percent = Home Consumption / Home Production</li></ul> |
| model: | Optional | `sunsynk` | Selects which status codes to use. Options are `lux`, `solis`, `goodwe`, `goodwe_gridmode`, `foxess`, `solax`, `sunsynk`, `victron`, `fronius`, `solaredge`, `growatt`, `sofar`, `ces-battery-box` and `huawei`. |
| model: | Optional | `sunsynk` | Selects which status codes to use. Options are `lux`, `solis`, `goodwe`, `goodwe_gridmode`, `foxess`, `solax`, `sunsynk`, `victron`, `fronius`, `solaredge`, `growatt`, `sofar`, `ces-battery-box`, `deye`, `azzurro` and `huawei`. |
| 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 rounded to 1 decimal place |
| three_phase: | Optional | `false` | If set to `true` additional 3 phase sensors will be displayed. Requires entity attributes to be defined i.e. `inverter_current_L2`, `inverter_current_L3`, `inverter_voltage_L2`, `inverter_voltage_L3` , `grid_ct_power_L2`, `grid_ct_power_L3`, `load_power_L1`, `load_power_L2`, `load_power_L3`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sunsynk-power-flow-card",
"version": "4.24.6",
"version": "4.25.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": {
Expand Down
15 changes: 15 additions & 0 deletions src/inverters/brands/azzurro.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {InverterSettingsDto} from '../dto/inverter-settings.dto';
import {InverterModel} from '../../types';
import {localize} from '../../localize/localize';

export class Azzurro extends InverterSettingsDto {
brand = InverterModel.Azzurro;
statusGroups = {
standby: {states: ['0', 'standby', 'stand-by'], color: 'blue', message: localize('common.standby')},
selftest: {states: ['1', 'selftest', 'self-checking'], color: 'yellow', message: localize('common.selftest')},
normal: {states: ['2', 'normal', 'ok'], color: 'green', message: localize('common.normal')},
alarm: {states: ['3', 'alarm'], color: 'orange', message: localize('common.alarm')},
fault: {states: ['4', 'fault'], color: 'red', message: localize('common.fault')},
};
image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAABICAYAAAC9bQZsAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABENSURBVGhDzVtpbFzXdT5v3uzDGW4SSdFaLNGyZFOxFKmSZSmKLbl1GwNu3CKxjaBOkAVG4KT5XaQ/avRHf/RnugBBCzRomwKRHDiFjbSOHddFHLdoKxu2IjmyRFIiKSqUxX2ZfabnO/feN/fNvDccygWazzi827lnueeub2Tn2a98/RnHdf+ByImSRr1e17kg1L12x4lIqsogR8rcIKWNAf4mTiNGZGp5Wl9dFwHHp5OpXpVSxKEfOfXIH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uTA//73LH7z/Zc3agscff/KrsXj80IUL7/3d/n377oklkifGx6+evfDeO29rlv8/zD1/6rulb56o/+R3d7+B8oNHjjiPPfb4OydOnanvH33gb4Xp1xRtp2I0nqjXIm49keyaR7laZqrIPl3jbX4Fdb+eIPpf0BVqpTZQ8C4AAAAASUVORK5CYII='
}
3 changes: 3 additions & 0 deletions src/inverters/inverter-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {Sunsynk} from './brands/sunsynk';
import {CesBatteryBox} from './brands/ces-battery-box';
import {SolarEdge} from './brands/solar-edge';
import {Deye} from './brands/deye';
import {Azzurro} from './brands/azzurro';


export class InverterFactory {
Expand All @@ -29,6 +30,8 @@ export class InverterFactory {

private static createInstance(brand: InverterModel): InverterSettingsDto {
switch (brand) {
case InverterModel.Azzurro:
return new Azzurro();
case InverterModel.Solis:
return new Solis();
case InverterModel.Lux:
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ declare global {


export enum InverterModel {
Azzurro = 'azzurro',
Sunsynk = 'sunsynk',
Lux = 'lux',
GoodweGridMode = 'goodwe_gridmode',
Expand Down

0 comments on commit 6ea9a51

Please sign in to comment.