Skip to content

Commit c9ee84d

Browse files
committed
Fix scaling of SolaX X3 G4-Pro Inverter Temperature
For newer firmware versions it seems the 0.1 scaling is no longer required. This is an undocumented register so hard to know what is going on. However it requires the scaling on older firmware versions but not on a newer one, so guessing this is protocol version related.
1 parent f9dfd41 commit c9ee84d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

custom_components/solax_modbus/plugin_solax.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6302,12 +6302,26 @@ def value_function_battery_voltage_cell_difference(initval: int, descr: Any, dat
63026302
device_class=SensorDeviceClass.TEMPERATURE,
63036303
state_class=SensorStateClass.MEASUREMENT,
63046304
register=0x8,
6305+
modbus_max=99,
63056306
register_type=REG_INPUT,
63066307
scale=0.1,
63076308
register_data_type=REGISTER_S16,
63086309
allowedtypes=AC | HYBRID | GEN5 | GEN6 | X3,
63096310
entity_category=EntityCategory.DIAGNOSTIC,
63106311
),
6312+
SolaXModbusSensorEntityDescription(
6313+
name="Inverter Temperature",
6314+
key="inverter_temperature",
6315+
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
6316+
device_class=SensorDeviceClass.TEMPERATURE,
6317+
state_class=SensorStateClass.MEASUREMENT,
6318+
register=0x8,
6319+
modbus_min=100, # Technically undocumented, but seems to work fine.
6320+
register_type=REG_INPUT,
6321+
register_data_type=REGISTER_S16,
6322+
allowedtypes=AC | HYBRID | GEN5 | GEN6 | X3,
6323+
entity_category=EntityCategory.DIAGNOSTIC,
6324+
),
63116325
SolaXModbusSensorEntityDescription(
63126326
name="Run Mode",
63136327
key="run_mode",

0 commit comments

Comments
 (0)