Skip to content

Commit 622808a

Browse files
committed
Update Growatt Time Tpyes
1 parent e714817 commit 622808a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

custom_components/solax_modbus/plugin_growatt.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
BaseModbusNumberEntityDescription,
4242
BaseModbusSelectEntityDescription,
4343
BaseModbusSensorEntityDescription,
44+
BaseModbusTimeEntityDescription,
4445
UnitOfReactivePower,
4546
plugin_base,
4647
value_function_rtc_ymd,
@@ -151,6 +152,11 @@ class GrowattModbusSensorEntityDescription(BaseModbusSensorEntityDescription):
151152
register_type: int = REG_HOLDING
152153

153154

155+
@dataclass(kw_only=True, frozen=True)
156+
class GrowattModbusTimeEntityDescription(BaseModbusTimeEntityDescription):
157+
allowedtypes: int = ALLDEFAULT # maybe 0x0000 (nothing) is a better default choice
158+
159+
154160
# ====================================== Computed value functions =================================================
155161
def time_to_int(time_str: str | None) -> int:
156162
if time_str is None:

0 commit comments

Comments
 (0)