@@ -1413,6 +1413,79 @@ class TuyaSensorEntityDescription(SensorEntityDescription):
14131413 # Wireless Switch
14141414 # https://developer.tuya.com/en/docs/iot/s?id=Kbeoa9fkv6brp
14151415 "wxkg" : BATTERY_SENSORS , # Pressure Sensor
1416+ # Micro Storage Inverter
1417+ # Energy storage and solar PV inverter system with monitoring capabilities
1418+ "xnyjcn" : (
1419+ TuyaSensorEntityDescription (
1420+ key = DPCode .CURRENT_SOC ,
1421+ translation_key = "battery_soc" ,
1422+ device_class = SensorDeviceClass .BATTERY ,
1423+ state_class = SensorStateClass .MEASUREMENT ,
1424+ entity_category = EntityCategory .DIAGNOSTIC ,
1425+ ),
1426+ TuyaSensorEntityDescription (
1427+ key = DPCode .PV_POWER_TOTAL ,
1428+ translation_key = "total_pv_power" ,
1429+ device_class = SensorDeviceClass .POWER ,
1430+ state_class = SensorStateClass .MEASUREMENT ,
1431+ ),
1432+ TuyaSensorEntityDescription (
1433+ key = DPCode .PV_POWER_CHANNEL_1 ,
1434+ translation_key = "pv_channel_power" ,
1435+ translation_placeholders = {"index" : "1" },
1436+ device_class = SensorDeviceClass .POWER ,
1437+ state_class = SensorStateClass .MEASUREMENT ,
1438+ ),
1439+ TuyaSensorEntityDescription (
1440+ key = DPCode .PV_POWER_CHANNEL_2 ,
1441+ translation_key = "pv_channel_power" ,
1442+ translation_placeholders = {"index" : "2" },
1443+ device_class = SensorDeviceClass .POWER ,
1444+ state_class = SensorStateClass .MEASUREMENT ,
1445+ ),
1446+ TuyaSensorEntityDescription (
1447+ key = DPCode .BATTERY_POWER ,
1448+ translation_key = "battery_power" ,
1449+ device_class = SensorDeviceClass .POWER ,
1450+ state_class = SensorStateClass .MEASUREMENT ,
1451+ ),
1452+ TuyaSensorEntityDescription (
1453+ key = DPCode .INVERTER_OUTPUT_POWER ,
1454+ translation_key = "inverter_output_power" ,
1455+ device_class = SensorDeviceClass .POWER ,
1456+ state_class = SensorStateClass .MEASUREMENT ,
1457+ ),
1458+ TuyaSensorEntityDescription (
1459+ key = DPCode .CUMULATIVE_ENERGY_GENERATED_PV ,
1460+ translation_key = "lifetime_pv_energy" ,
1461+ device_class = SensorDeviceClass .ENERGY ,
1462+ state_class = SensorStateClass .TOTAL_INCREASING ,
1463+ ),
1464+ TuyaSensorEntityDescription (
1465+ key = DPCode .CUMULATIVE_ENERGY_OUTPUT_INV ,
1466+ translation_key = "lifetime_inverter_output_energy" ,
1467+ device_class = SensorDeviceClass .ENERGY ,
1468+ state_class = SensorStateClass .TOTAL_INCREASING ,
1469+ ),
1470+ TuyaSensorEntityDescription (
1471+ key = DPCode .CUMULATIVE_ENERGY_DISCHARGED ,
1472+ translation_key = "lifetime_battery_discharge_energy" ,
1473+ device_class = SensorDeviceClass .ENERGY ,
1474+ state_class = SensorStateClass .TOTAL_INCREASING ,
1475+ ),
1476+ TuyaSensorEntityDescription (
1477+ key = DPCode .CUMULATIVE_ENERGY_CHARGED ,
1478+ translation_key = "lifetime_battery_charge_energy" ,
1479+ device_class = SensorDeviceClass .ENERGY ,
1480+ state_class = SensorStateClass .TOTAL_INCREASING ,
1481+ ),
1482+ TuyaSensorEntityDescription (
1483+ key = DPCode .CUML_E_EXPORT_OFFGRID1 ,
1484+ translation_key = "lifetime_offgrid_port_energy" ,
1485+ device_class = SensorDeviceClass .ENERGY ,
1486+ state_class = SensorStateClass .TOTAL_INCREASING ,
1487+ ),
1488+ ),
14161489 # https://developer.tuya.com/en/docs/iot/categoryylcg?id=Kaiuz3kc2e4gm
14171490 "ylcg" : (
14181491 TuyaSensorEntityDescription (
0 commit comments