Skip to content

Commit

Permalink
feat: Add Today's and Total Generation - Deye
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Dec 17, 2024
1 parent 7e94a4d commit 216ae4e
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 24 deletions.
34 changes: 33 additions & 1 deletion custom_components/solarman/inverter_definitions/deye_hybrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,26 @@ parameters:
validation:
min: 0.1

- name: "Today Generation"
class: "energy"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 1
registers: [0x003E]
icon: "mdi:generator-stationary"

- name: "Total Generation"
class: "energy"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 3
registers: [0x005C, 0x005F]
icon: "mdi:generator-stationary"
validation:
min: 0.1

- name: "Today Production"
friendly_name: Today's Production
class: "energy"
Expand Down Expand Up @@ -560,10 +580,11 @@ parameters:
rule: 1
digits: 1
scale: 0.1
registers: [0x004C, 0x006C, 0x0047, 0x004D, 0x0046, 0x0054]
registers: [0x004C, 0x003E, 0x006C, 0x0047, 0x004D, 0x0046, 0x0054]
uint: enforce
sensors:
- registers: [0x004C]
- registers: [0x003E]
- registers: [0x006C]
- registers: [0x0047]
- operator: subtract
Expand All @@ -586,6 +607,8 @@ parameters:
[
0x004E,
0x0050,
0x005C,
0x005F,
0x0060,
0x0061,
0x004A,
Expand All @@ -600,6 +623,7 @@ parameters:
uint: enforce
sensors:
- registers: [0x004E, 0x0050]
- registers: [0x005C, 0x005F]
- registers: [0x0060, 0x0061]
- registers: [0x004A, 0x004B]
- operator: subtract
Expand Down Expand Up @@ -1018,6 +1042,14 @@ parameters:
rule: 1
registers: [0x00A6]

- name: "Generator Voltage"
name_lookup: "io_mode_select"
class: "voltage"
state_class: "measurement"
uom: "V"
rule: 1
registers: [0x00B5]

- name: "Generator Frequency"
name_lookup: "io_mode_select"
state_class: "measurement"
Expand Down
72 changes: 49 additions & 23 deletions custom_components/solarman/inverter_definitions/deye_p3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,50 @@ parameters:
validation:
min: 0.1

- name: Today Generation
alt: Daily Generation
friendly_name: Today's Production
class: "energy"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 1
registers: [0x01F5]
icon: "mdi:generator-stationary"

- name: "Total Generation"
class: "energy"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 3
registers: [0x01F8, 0x01F9]
icon: "mdi:generator-stationary"
validation:
min: 0.1

- name: Today Production
alt: Daily Production
friendly_name: Today's Production
class: "energy"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 1
registers: [0x0211]
icon: "mdi:solar-power"

- name: "Total Production"
class: "energy"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 3
registers: [0x0216, 0x0217]
icon: "mdi:solar-power"
validation:
min: 0.1

- name: Today Losses
alt: Daily Losses
friendly_name: Today's Losses
Expand All @@ -1667,9 +1711,10 @@ parameters:
rule: 1
digits: 1
scale: 0.1
registers: [0x0208, 0x0211, 0x0203, 0x0209, 0x020E, 0x0202]
registers: [0x01F5, 0x0208, 0x0211, 0x0203, 0x0209, 0x020E, 0x0202]
uint: enforce
sensors:
- registers: [0x01F5]
- registers: [0x0208]
- registers: [0x0211]
- registers: [0x0203]
Expand All @@ -1691,6 +1736,8 @@ parameters:
scale: 0.1
registers:
[
0x01F8,
0x01F9,
0x020A,
0x020B,
0x0216,
Expand All @@ -1706,6 +1753,7 @@ parameters:
]
uint: enforce
sensors:
- registers: [0x01F8, 0x01F9]
- registers: [0x020A, 0x020B]
- registers: [0x0216, 0x0217]
- registers: [0x0206, 0x0207]
Expand All @@ -1718,28 +1766,6 @@ parameters:
validation:
min: 1

- name: Today Production
alt: Daily Production
friendly_name: Today's Production
class: "energy"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 1
registers: [0x0211]
icon: "mdi:solar-power"

- name: "Total Production"
class: "energy"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 3
registers: [0x0216, 0x0217]
icon: "mdi:solar-power"
validation:
min: 0.1

- name: "DC Temperature"
hidden:
class: "temperature"
Expand Down

0 comments on commit 216ae4e

Please sign in to comment.