Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion custom_components/foxess_modbus/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class InverterModel(StrEnum):
H3_PRO = "H3_PRO"
H3_SMART = "H3_SMART"

P3_SMART = "P3_SMART"


class Inv(Flag):
"""
Expand Down Expand Up @@ -90,8 +92,9 @@ class Inv(Flag):
H3_PRO_SET = H3_PRO_PRE122 | H3_PRO_122

H3_SMART = auto()
P3_SMART = auto()

ALL = H1_LAN | H1_G1 | H1_G2_SET | KH_SET | H3_SET | H3_PRO_SET | H3_SMART
ALL = H1_LAN | H1_G1 | H1_G2_SET | KH_SET | H3_SET | H3_PRO_SET | H3_SMART | P3_SMART


class RegisterPollType(IntEnum):
Expand Down
7 changes: 7 additions & 0 deletions custom_components/foxess_modbus/inverter_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,13 @@ def inverter_capacity(self, inverter_model: str) -> int:
versions={None: Inv.H3_SMART},
special_registers=H3_SMART_REGISTERS,
),
# P3-Smart series (e.g. P3-8.0-SH)
InverterModelProfile(InverterModel.P3_SMART, r"^P3-([\d\.]+)-SH").add_connection_type(
ConnectionType.AUX,
RegisterType.HOLDING,
versions={None: Inv.H3_SMART},
special_registers=H3_SMART_REGISTERS,
),
# The H3 seems to use holding registers for everything
InverterModelProfile(InverterModel.H3, r"^H3-([\d\.]+)").add_connection_type(
ConnectionType.AUX,
Expand Down