diff --git a/custom_components/solis/const.py b/custom_components/solis/const.py index 29e536d..931667e 100644 --- a/custom_components/solis/const.py +++ b/custom_components/solis/const.py @@ -563,6 +563,22 @@ SensorStateClass.TOTAL_INCREASING, BACKUP_TODAY_ENERGY, ], + "smartloadpower": [ + "Smart Load Power", + UnitOfPower.WATT, + "mdi:home-lightning-bolt", + SensorDeviceClass.POWER, + SensorStateClass.MEASUREMENT, + SMART_LOAD_POWER, + ], + "smartloadtodayenergy": [ + "Daily Smart Load Energy", + UnitOfEnergy.KILO_WATT_HOUR, + "mdi:home-lightning-bolt", + SensorDeviceClass.ENERGY, + SensorStateClass.TOTAL_INCREASING, + SMART_LOAD_TODAY_ENERGY, + ], "meterItemACurrent": [ "Meter item A current", UnitOfElectricCurrent.AMPERE, diff --git a/custom_components/solis/soliscloud_api.py b/custom_components/solis/soliscloud_api.py index 18877e3..5f6e42f 100644 --- a/custom_components/solis/soliscloud_api.py +++ b/custom_components/solis/soliscloud_api.py @@ -219,6 +219,9 @@ SOC_DISCHARGE_SET: ["socDischargeSet", float, 0], BYPASS_LOAD_POWER: ["bypassLoadPower", float, 3], BYPASS_LOAD_POWER_STR: ["bypassLoadPowerStr", str, None], + SMART_LOAD_POWER: ["backup2Power", float, 3], + SMART_LOAD_POWER_STR: ["backup2PowerStr", str, None], + SMART_LOAD_TODAY_ENERGY: ["backup2TodayEnergy", float, 3], METER_ITEM_A_CURRENT: ["iA", float, 3], METER_ITEM_A_VOLTAGE: ["uA", float, 3], METER_ITEM_B_CURRENT: ["iB", float, 3], @@ -651,6 +654,7 @@ def _post_process(self) -> None: self._fix_units(GRID_YEARLY_ENERGY_PURCHASED, GRID_YEARLY_ENERGY_PURCHASED_STR) self._fix_units(GRID_DAILY_ENERGY_USED, GRID_DAILY_ENERGY_USED_STR) self._fix_units(BYPASS_LOAD_POWER, BYPASS_LOAD_POWER_STR) + self._fix_units(SMART_LOAD_POWER, SMART_LOAD_POWER_STR) # Just temporary till SolisCloud is fixed try: diff --git a/custom_components/solis/soliscloud_const.py b/custom_components/solis/soliscloud_const.py index eddf992..34ca813 100644 --- a/custom_components/solis/soliscloud_const.py +++ b/custom_components/solis/soliscloud_const.py @@ -92,6 +92,8 @@ SOC_CHARGING_SET = "socChargingSet" SOC_DISCHARGE_SET = "socDischargeSet" BYPASS_LOAD_POWER = "bypassLoadPower" +SMART_LOAD_POWER = "backup2Power" +SMART_LOAD_TODAY_ENERGY = "backup2TodayEnergy" METER_ITEM_A_CURRENT = "meterItemACurrent" METER_ITEM_A_VOLTAGE = "meterItemAVoltage" METER_ITEM_B_CURRENT = "meterItemBCurrent" @@ -128,4 +130,5 @@ GRID_YEARLY_ENERGY_PURCHASED_STR = "yearlyEnergyPurchasedUnit" GRID_DAILY_ENERGY_USED_STR = "dailyEnergyUsedUnit" BYPASS_LOAD_POWER_STR = "bypassLoadPowerUnit" +SMART_LOAD_POWER_STR = "backup2PowerUnit" PLANT_TOTAL_CONSUMPTION_POWER_STR = "plantTotalConsumptionPowerUnit"