Skip to content

Commit

Permalink
Merge pull request #590 from paultweedy77/main
Browse files Browse the repository at this point in the history
Remove unused PV1 & PV2 power registers from H1_G2
  • Loading branch information
canton7 authored Apr 13, 2024
2 parents 0ca4041 + d1a4918 commit 1cd307b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ def _pv_energy_total(key: str, models: list[EntitySpec], name: str, source_entit
addresses=[
ModbusAddressesSpec(input=[11002], models=Inv.H1_G1 | Inv.KH_PRE119),
ModbusAddressesSpec(holding=[31002], models=Inv.H1_G1 | Inv.H1_LAN | Inv.KH_119 | Inv.H3_SET),
ModbusAddressesSpec(holding=[39280, 39279], models=Inv.H1_G2),
# This is techincally a 32-bit register on the G2, but it doesn't appear to actually write the upper word,
# which means that negative values are represented incorrectly (as 0x0000FFFF etc)
ModbusAddressesSpec(holding=[39280], models=Inv.H1_G2),
],
name="PV1 Power",
)
Expand Down Expand Up @@ -252,7 +254,9 @@ def _pv_energy_total(key: str, models: list[EntitySpec], name: str, source_entit
addresses=[
ModbusAddressesSpec(input=[11005], models=Inv.H1_G1 | Inv.KH_PRE119),
ModbusAddressesSpec(holding=[31005], models=Inv.H1_G1 | Inv.H1_LAN | Inv.KH_119 | Inv.H3_SET),
ModbusAddressesSpec(holding=[39282, 39281], models=Inv.H1_G2),
# This is techincally a 32-bit register on the G2, but it doesn't appear to actually write the upper word,
# which means that negative values are represented incorrectly (as 0x0000FFFF etc)
ModbusAddressesSpec(holding=[39282], models=Inv.H1_G2),
],
name="PV2 Power",
)
Expand Down

0 comments on commit 1cd307b

Please sign in to comment.