Skip to content

Commit

Permalink
refactor: Inverter profiles formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Aug 12, 2024
1 parent e25280f commit c34c6f5
Show file tree
Hide file tree
Showing 7 changed files with 1,188 additions and 1,188 deletions.
76 changes: 38 additions & 38 deletions custom_components/solarman/inverter_definitions/afore_hybrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default:
update_interval: 10
code: 0x04
digits: 6

parameters:
- group: solar
items:
Expand Down Expand Up @@ -52,7 +52,7 @@ parameters:
scale: 1
rule: 1
registers: [0x022D]
icon: "mdi:solar-power"
icon: "mdi:solar-power"

- name: "PV2 W"
class: "power"
Expand All @@ -61,7 +61,7 @@ parameters:
scale: 1
rule: 1
registers: [0x0230]
icon: "mdi:solar-power"
icon: "mdi:solar-power"

- name: "PV Power W"
class: "power"
Expand All @@ -76,12 +76,12 @@ parameters:
items:
- name: "Total Battery Charge"
class: "energy"
state_class: "total_increasing"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 1
registers: [0x07DC]
icon: 'mdi:battery-plus'
icon: "mdi:battery-plus"

- name: "Total Battery Discharge"
class: "energy"
Expand All @@ -90,27 +90,27 @@ parameters:
scale: 0.1
rule: 1
registers: [0x07DE]
icon: 'mdi:battery-minus'
icon: "mdi:battery-minus"

- name: "Today Battery Charge"
friendly_name: "Today's Battery Charge"
class: "energy"
state_class: "total_increasing"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 1
registers: [0x07D9]
icon: 'mdi:battery-plus'
icon: "mdi:battery-plus"

- name: "Today Battery Discharge"
friendly_name: "Today's Battery Discharge"
class: "energy"
state_class: "total_increasing"
state_class: "total_increasing"
uom: "kWh"
scale: 0.1
rule: 1
registers: [0x07DA]
icon: 'mdi:battery-minus'
icon: "mdi:battery-minus"

- name: "Battery Status"
class: ""
Expand All @@ -120,14 +120,14 @@ parameters:
rule: 1
registers: [0x07D0]
isstr: true
lookup:
- key: 4
value: "Charge"
- key: 5
value: "Discharge"
- key: 6
value: "Stand-by"
icon: 'mdi:battery'
lookup:
- key: 4
value: "Charge"
- key: 5
value: "Discharge"
- key: 6
value: "Stand-by"
icon: "mdi:battery"

- name: "Battery Power"
class: "power"
Expand All @@ -136,7 +136,7 @@ parameters:
scale: 1
rule: 2
registers: [0x07D8]
icon: 'mdi:battery'
icon: "mdi:battery"

- name: "Battery Voltage"
class: "voltage"
Expand All @@ -145,7 +145,7 @@ parameters:
scale: 0.1
rule: 1
registers: [0x07D4]
icon: 'mdi:battery'
icon: "mdi:battery"

- name: "Battery Current"
class: "current"
Expand All @@ -154,7 +154,7 @@ parameters:
scale: 0.01
rule: 2
registers: [0x07D5]
icon: 'mdi:battery'
icon: "mdi:battery"

- name: "Battery SOC"
class: "battery"
Expand All @@ -163,16 +163,16 @@ parameters:
scale: 1
rule: 1
registers: [0x07D2]
icon: 'mdi:battery'
icon: "mdi:battery"

- name: "Battery Temperature"
class: "temperature"
state_class: "measurement"
uom: "°C"
scale: 0.1
rule: 1
rule: 1
registers: [0x07D1]
icon: 'mdi:battery'
icon: "mdi:battery"

- group: Grid
items:
Expand All @@ -192,7 +192,7 @@ parameters:
scale: 1
rule: 2
registers: [0x0212]
icon: "mdi:home-lightning-bolt"
icon: "mdi:home-lightning-bolt"

- name: "AC Voltage"
class: "voltage"
Expand All @@ -201,16 +201,16 @@ parameters:
scale: 0.1
rule: 1
registers: [0x01FB]
icon: 'mdi:transmission-tower'
icon: "mdi:transmission-tower"

- name: "Grid Current"
class: "current"
state_class: "measurement"
state_class: "measurement"
uom: "A"
scale: 0.01
rule: 2
registers: [0x01FE]
icon: 'mdi:home-lightning-bolt'
icon: "mdi:home-lightning-bolt"

- name: "AC Frequency"
class: "frequency"
Expand All @@ -219,19 +219,19 @@ parameters:
scale: 0.01
rule: 1
registers: [0x0201]
icon: 'mdi:home-lightning-bolt'
icon: "mdi:home-lightning-bolt"

- group: Inverter
items:
- name: "Running Status"
class: ""
state_class: ""
state_class: ""
uom: ""
scale: 1
rule: 1
registers: [0x09C4]
isstr: true
lookup:
lookup:
- key: 1
value: "Stand-by"
- key: 2
Expand All @@ -245,10 +245,10 @@ parameters:
- key: 6
value: "Off grid"
- key: 7
value: "On grid"
value: "On grid"
- key: 10
value: "On grid"
icon: 'mdi:home-lightning-bolt'
value: "On grid"
icon: "mdi:home-lightning-bolt"

- name: "Temperature"
class: "temperature"
Expand All @@ -266,8 +266,8 @@ parameters:
scale: 0.1
rule: 1
registers: [0x09D2]
icon: "mdi:thermometer"
icon: "mdi:thermometer"

- group: Total
items:
- name: "Today Production"
Expand Down Expand Up @@ -342,4 +342,4 @@ parameters:
uom: "kWh"
scale: 0.1
rule: 1
registers: [0x03FF]
registers: [0x03FF]
16 changes: 8 additions & 8 deletions custom_components/solarman/inverter_definitions/deye_2mppt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ parameters:
"LV 3-Phase Hybrid Inverter",
"HV 3-Phase Hybrid Inverter",
"HV 3-Phase Inverter 6-15kw",
"HV 3-Phase Inverter 20-50kw"
"HV 3-Phase Inverter 20-50kw",
]
lookup:
- key: 2
Expand All @@ -335,7 +335,7 @@ parameters:
"Device Serial Number",
"Device Rated Power",
"Device MPPTs",
"Device Phases"
"Device Phases",
]

# Device - Modbus Address
Expand Down Expand Up @@ -377,7 +377,7 @@ parameters:
value: "1.5"
- key: 513
value: "5.13"

- name: "Device Serial Number"
class: ""
state_class: ""
Expand Down Expand Up @@ -592,7 +592,7 @@ parameters:
"Grid error",
"Battery loss",
"Parallel communication quality",
"Error"
"Error",
]
lookup:
- key: 0x0000
Expand All @@ -610,7 +610,7 @@ parameters:

- group: Control
items:
# Device - On/Off Switch
# Device - On/Off Switch
- name: ""
update_interval: 300
class: "switch"
Expand All @@ -620,7 +620,7 @@ parameters:
rule: 1
registers: [0x002b]

# Island Protection - On/Off Switch
# Island Protection - On/Off Switch
- name: "Island Protection"
update_interval: 300
class: "switch"
Expand All @@ -630,7 +630,7 @@ parameters:
rule: 1
registers: [0x002e]

# Soft Start - On/Off Switch
# Soft Start - On/Off Switch
- name: "Soft Start"
update_interval: 300
class: "switch"
Expand All @@ -640,7 +640,7 @@ parameters:
rule: 1
registers: [0x002F]

# Over-frequency Load-shedding - On/Off Switch
# Over-frequency Load-shedding - On/Off Switch
- name: "Over-frequency Load Reduction"
update_interval: 300
class: "switch"
Expand Down
16 changes: 8 additions & 8 deletions custom_components/solarman/inverter_definitions/deye_4mppt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ parameters:
"LV 3-Phase Hybrid Inverter",
"HV 3-Phase Hybrid Inverter",
"HV 3-Phase Inverter 6-15kw",
"HV 3-Phase Inverter 20-50kw"
"HV 3-Phase Inverter 20-50kw",
]
lookup:
- key: 2
Expand All @@ -392,7 +392,7 @@ parameters:
"Device Serial Number",
"Device Rated Power",
"Device MPPTs",
"Device Phases"
"Device Phases",
]

# Device - Modbus Address
Expand Down Expand Up @@ -434,7 +434,7 @@ parameters:
value: "1.5"
- key: 513
value: "5.13"

- name: "Device Serial Number"
class: ""
state_class: ""
Expand Down Expand Up @@ -649,7 +649,7 @@ parameters:
"Grid error",
"Battery loss",
"Parallel communication quality",
"Error"
"Error",
]
lookup:
- key: 0x0000
Expand All @@ -667,7 +667,7 @@ parameters:

- group: Control
items:
# Device - On/Off Switch
# Device - On/Off Switch
- name: ""
update_interval: 300
class: "switch"
Expand All @@ -677,7 +677,7 @@ parameters:
rule: 1
registers: [0x002b]

# Island Protection - On/Off Switch
# Island Protection - On/Off Switch
- name: "Island Protection"
update_interval: 300
class: "switch"
Expand All @@ -687,7 +687,7 @@ parameters:
rule: 1
registers: [0x002e]

# Soft Start - On/Off Switch
# Soft Start - On/Off Switch
- name: "Soft Start"
update_interval: 300
class: "switch"
Expand All @@ -697,7 +697,7 @@ parameters:
rule: 1
registers: [0x002F]

# Over-frequency Load-shedding - On/Off Switch
# Over-frequency Load-shedding - On/Off Switch
- name: "Over-frequency Load Reduction"
update_interval: 300
class: "switch"
Expand Down
Loading

0 comments on commit c34c6f5

Please sign in to comment.