Skip to content

Commit

Permalink
Solis-Hybrid: add external battery power sign (#11842)
Browse files Browse the repository at this point in the history
  • Loading branch information
premultiply authored Jan 25, 2024
1 parent 28f7470 commit 8ad563e
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions templates/definition/meter/solis-hybrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,25 @@ render: |
{{- end }}
{{- if eq .usage "battery" }}
power:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
type: input
address: 33149 # Battery power
decode: int32
source: calc
mul:
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
type: input
address: 33149 # Battery power
decode: uint32
- source: calc
add:
- source: modbus
{{- include "modbus" . | indent 6 }}
register:
type: input
address: 33135 # Battery current direction
decode: uint16 # 0:charge, 1:discharge
scale: 2
- source: const
value: -1
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
Expand Down

0 comments on commit 8ad563e

Please sign in to comment.