Skip to content

Commit

Permalink
Enhance sensor definitions by adding new sensors for grid, inverter, …
Browse files Browse the repository at this point in the history
…load, and battery management. This update includes additional voltage and current sensors for multiple phases, as well as comprehensive battery configuration sensors. Documentation for the Power Flow Card and battery sensors has also been updated for clarity.
  • Loading branch information
maslyankov committed Jan 15, 2025
1 parent 8c3a9ba commit 822b66f
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 3 deletions.
35 changes: 35 additions & 0 deletions src/ha_addon_sunsynk_multi/sensor_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,18 @@ def import_definitions() -> None:
"grid_l3_power", # 3PH LV & HV
"grid_power",
"grid_voltage",
"grid_current",
"inverter_current",
"inverter_power",
"inverter_voltage",
"load_frequency",
"load_power",
"load_l1_power",
"load_l2_power",
"load_l3_power",
"load_l1_voltage",
"load_l2_voltage",
"load_l3_voltage",
"non_essential_power",
"overall_state",
"priority_load",
Expand All @@ -196,6 +201,12 @@ def import_definitions() -> None:
"pv2_current",
"pv2_power",
"pv2_voltage",
"pv3_current",
"pv3_power",
"pv3_voltage",
"pv4_current",
"pv4_power",
"pv4_voltage",
"use_timer",
],
"settings": [
Expand Down Expand Up @@ -244,6 +255,7 @@ def import_definitions() -> None:
"grid_standard",
"configured_grid_frequency",
"configured_grid_phases",
"track_grid_phase",
"ups_delay_time",
],
"generator": [
Expand All @@ -259,6 +271,9 @@ def import_definitions() -> None:
"gen_signal_on",
],
"diagnostics": [
"inverter_l1_power",
"inverter_l2_power",
"inverter_l3_power",
"grid_voltage",
"grid_l1_voltage",
"grid_l2_voltage",
Expand All @@ -281,6 +296,26 @@ def import_definitions() -> None:
"lithium_battery_loss_warning",
"parallel_communication_quality_warning",
],
"battery": [
"battery_type",
"battery_capacity_current",
"battery_max_charge_current",
"battery_max_discharge_current",
"battery_shutdown_capacity",
"battery_restart_capacity",
"battery_low_capacity",
"battery_equalization_voltage",
"battery_absorption_voltage",
"battery_float_voltage",
"battery_shutdown_voltage",
"battery_low_voltage",
"battery_restart_voltage",
"battery_wake_up",
"battery_resistance",
"battery_charge_efficiency",
"battery_equalization_days",
"battery_equalization_hours",
],
}


Expand Down
68 changes: 65 additions & 3 deletions www/docs/reference/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ total_pv_energy

:::

### Power flow card: `power_flow_card`
### Power Flow Card

These are all sensors used by the [Power Flow Card](../examples/lovelace#sunsynk-power-flow-card)

Expand All @@ -97,10 +97,12 @@ SENSORS:
```yaml
aux_power
battery_1_soc # 3PH HV
battery_1_voltage # 3PH HV
battery_current
battery_power
battery_soc
battery_voltage
battery_soc # 1PH & 3PH LV
battery_voltage # 1PH & 3PH LV
day_battery_charge
day_battery_discharge
day_grid_export
Expand All @@ -110,18 +112,40 @@ day_pv_energy
essential_power
grid_connected
grid_ct_power
grid_current
grid_frequency
grid_l1_power # 3PH LV & HV
grid_l2_power # 3PH LV & HV
grid_l3_power # 3PH LV & HV
grid_power
grid_voltage
inverter_current
inverter_power
inverter_voltage
load_frequency
load_power
load_l1_power
load_l2_power
load_l3_power
load_l1_voltage
load_l2_voltage
load_l3_voltage
non_essential_power
overall_state
priority_load
pv_power
pv1_current
pv1_power
pv1_voltage
pv2_current
pv2_power
pv2_voltage
pv3_current
pv3_power
pv3_voltage
pv4_current
pv4_power
pv4_voltage
use_timer
```

Expand Down Expand Up @@ -186,6 +210,7 @@ battery_charge_efficiency
grid_standard
configured_grid_frequency
configured_grid_phases
track_grid_phase
ups_delay_time
```

Expand Down Expand Up @@ -229,6 +254,9 @@ SENSORS:
::: details Sensors included
```yaml
inverter_l1_power
inverter_l2_power
inverter_l3_power
grid_voltage
grid_l1_voltage
grid_l2_voltage
Expand All @@ -254,6 +282,40 @@ parallel_communication_quality_warning

:::

### Battery

Sensors used for battery configuration and management.

```yaml
SENSORS:
- battery
```
::: details Sensors included
```yaml
battery_type
battery_capacity_current
battery_max_charge_current
battery_max_discharge_current
battery_shutdown_capacity
battery_restart_capacity
battery_low_capacity
battery_equalization_voltage
battery_absorption_voltage
battery_float_voltage
battery_shutdown_voltage
battery_low_voltage
battery_restart_voltage
battery_wake_up
battery_resistance
battery_charge_efficiency
battery_equalization_days
battery_equalization_hours
```

:::

### My Sensors

You can create custom sensors by defining them in a file called `mysensors.py` in the `/share/hass-addon-sunsynk/` directory. This allows you to add sensors that are not included in the default definitions.
Expand Down

0 comments on commit 822b66f

Please sign in to comment.