File tree Expand file tree Collapse file tree
custom_components/solax_modbus Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 =================================================
155161def time_to_int (time_str : str | None ) -> int :
156162 if time_str is None :
You can’t perform that action at this time.
0 commit comments