Skip to content

Commit 058cc46

Browse files
authored
Merge pull request #2072 from TCWORLD/fix-x3pro-temperature
Fix scaling of SolaX X3 G4-Pro Inverter Temperature (protocol≥100)
2 parents 16cc047 + c9ee84d commit 058cc46

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
@@ -6341,12 +6341,26 @@ def value_function_battery_voltage_cell_difference(initval: int, descr: Any, dat
63416341
device_class=SensorDeviceClass.TEMPERATURE,
63426342
state_class=SensorStateClass.MEASUREMENT,
63436343
register=0x8,
6344+
modbus_max=99,
63446345
register_type=REG_INPUT,
63456346
scale=0.1,
63466347
register_data_type=REGISTER_S16,
63476348
allowedtypes=AC | HYBRID | GEN5 | GEN6 | X3,
63486349
entity_category=EntityCategory.DIAGNOSTIC,
63496350
),
6351+
SolaXModbusSensorEntityDescription(
6352+
name="Inverter Temperature",
6353+
key="inverter_temperature",
6354+
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
6355+
device_class=SensorDeviceClass.TEMPERATURE,
6356+
state_class=SensorStateClass.MEASUREMENT,
6357+
register=0x8,
6358+
modbus_min=100, # Technically undocumented, but seems to work fine.
6359+
register_type=REG_INPUT,
6360+
register_data_type=REGISTER_S16,
6361+
allowedtypes=AC | HYBRID | GEN5 | GEN6 | X3,
6362+
entity_category=EntityCategory.DIAGNOSTIC,
6363+
),
63506364
SolaXModbusSensorEntityDescription(
63516365
name="Run Mode",
63526366
key="run_mode",

0 commit comments

Comments
 (0)