diff --git a/custom_components/solis/const.py b/custom_components/solis/const.py index fa251c3..719884b 100644 --- a/custom_components/solis/const.py +++ b/custom_components/solis/const.py @@ -14,6 +14,8 @@ ENERGY_KILO_WATT_HOUR, ENERGY_MEGA_WATT_HOUR, POWER_WATT, + POWER_VOLT_AMPERE_REACTIVE, + POWER_VOLT_AMPERE, ELECTRIC_CURRENT_AMPERE, DEVICE_CLASS_CURRENT, DEVICE_CLASS_ENERGY, @@ -479,6 +481,78 @@ STATE_CLASS_TOTAL_INCREASING, GRID_TOTAL_ENERGY_USED ], + 'gridphase1power': [ + 'Grid Phase1 Power', + POWER_WATT, + 'mdi:home-import-outline', + DEVICE_CLASS_POWER, + STATE_CLASS_MEASUREMENT, + GRID_PHASE1_POWER + ], + 'gridphase2power': [ + 'Grid Phase2 Power', + POWER_WATT, + 'mdi:home-import-outline', + DEVICE_CLASS_POWER, + STATE_CLASS_MEASUREMENT, + GRID_PHASE2_POWER + ], + 'gridphase3power': [ + 'Grid Phase3 Power', + POWER_WATT, + 'mdi:home-import-outline', + DEVICE_CLASS_POWER, + STATE_CLASS_MEASUREMENT, + GRID_PHASE3_POWER + ], + 'gridapparentphase1power': [ + 'Grid Phase1 Apparent Power', + POWER_VOLT_AMPERE, + 'mdi:home-import-outline', + None, + STATE_CLASS_MEASUREMENT, + GRID_APPARENT_PHASE1_POWER + ], + 'gridapparentphase2power': [ + 'Grid Phase2 Apparent Power', + POWER_VOLT_AMPERE, + 'mdi:home-import-outline', + None, + STATE_CLASS_MEASUREMENT, + GRID_APPARENT_PHASE2_POWER + ], + 'gridapparentphase3power': [ + 'Grid Phase3 Apparent Power', + POWER_VOLT_AMPERE, + 'mdi:home-import-outline', + None, + STATE_CLASS_MEASUREMENT, + GRID_APPARENT_PHASE3_POWER + ], + 'gridreactivephase1power': [ + 'Grid Phase1 Reactive Power', + POWER_VOLT_AMPERE_REACTIVE, + 'mdi:home-import-outline', + None, + STATE_CLASS_MEASUREMENT, + GRID_REACTIVE_PHASE1_POWER + ], + 'gridreactivephase2power': [ + 'Grid Phase2 Reactive Power', + POWER_VOLT_AMPERE_REACTIVE, + 'mdi:home-import-outline', + None, + STATE_CLASS_MEASUREMENT, + GRID_REACTIVE_PHASE2_POWER + ], + 'gridreactivephase3power': [ + 'Grid Phase3 Reactive Power', + POWER_VOLT_AMPERE_REACTIVE, + 'mdi:home-import-outline', + None, + STATE_CLASS_MEASUREMENT, + GRID_REACTIVE_PHASE3_POWER + ], 'batstateofhealth': [ 'Battery State Of Health', PERCENTAGE, diff --git a/custom_components/solis/ginlong_const.py b/custom_components/solis/ginlong_const.py index af099f3..a91388f 100644 --- a/custom_components/solis/ginlong_const.py +++ b/custom_components/solis/ginlong_const.py @@ -73,6 +73,15 @@ GRID_TOTAL_CONSUMPTION_POWER = 'totalConsumptionPower' GRID_TOTAL_ENERGY_PURCHASED = 'totalEnergyPurchased' GRID_TOTAL_ENERGY_USED = 'totalEnergyUsed' +GRID_PHASE1_POWER = 'Phase1Power' +GRID_PHASE2_POWER = 'Phase2Power' +GRID_PHASE3_POWER = 'Phase3Power' +GRID_APPARENT_PHASE1_POWER = 'ApparentPhase1Power' +GRID_APPARENT_PHASE2_POWER = 'ApparentPhase2Power' +GRID_APPARENT_PHASE3_POWER = 'ApparentPhase3Power' +GRID_REACTIVE_PHASE1_POWER = 'ReactivePhase1Power' +GRID_REACTIVE_PHASE2_POWER = 'ReactivePhase2Power' +GRID_REACTIVE_PHASE3_POWER = 'ReactivePhase3Power' SOC_CHARGING_SET = 'socChargingSet' SOC_DISCHARGE_SET = 'socDischargeSet' BYPASS_LOAD_POWER = 'bypassLoadPower' diff --git a/custom_components/solis/soliscloud_api.py b/custom_components/solis/soliscloud_api.py index 1843f75..4410360 100644 --- a/custom_components/solis/soliscloud_api.py +++ b/custom_components/solis/soliscloud_api.py @@ -118,14 +118,21 @@ GRID_TOTAL_ON_GRID_ENERGY_STR: ['gridSellTotalEnergyStr', str, None], GRID_TOTAL_POWER: ['psum', float, 3], GRID_TOTAL_POWER_STR: ['psumStr', str, None], - GRID_TOTAL_CONSUMPTION_POWER: ['familyLoadPower', float, 3], - GRID_TOTAL_CONSUMPTION_POWER_STR: ['familyLoadPowerStr', str, None], GRID_TOTAL_ENERGY_USED: ['homeLoadTotalEnergy', float, 3], GRID_TOTAL_ENERGY_USED_STR: ['homeLoadTotalEnergyStr', str, None], + GRID_PHASE1_POWER: ['pA', float, 3], + GRID_PHASE2_POWER: ['pB', float, 3], + GRID_PHASE3_POWER: ['pC', float, 3], + GRID_APPARENT_PHASE1_POWER: ['aLookedPower', float, 3], + GRID_APPARENT_PHASE2_POWER: ['bLookedPower', float, 3], + GRID_APPARENT_PHASE3_POWER: ['cLookedPower', float, 3], + GRID_REACTIVE_PHASE1_POWER: ['aReactivePower', float, 3], + GRID_REACTIVE_PHASE2_POWER: ['bReactivePower', float, 3], + GRID_REACTIVE_PHASE3_POWER: ['cReactivePower', float, 3], SOC_CHARGING_SET: ['socChargingSet', float, 0], SOC_DISCHARGE_SET: ['socDischargeSet', float, 0], BYPASS_LOAD_POWER: ['bypassLoadPower', float, 3], - BYPASS_LOAD_POWER_STR: ['bypassLoadPowerStr', str, None], + BYPASS_LOAD_POWER_STR: ['bypassLoadPowerStr', str, None] }, PLANT_DETAIL: { INVERTER_PLANT_NAME: ['sno', str, None], #stationName no longer available? @@ -142,7 +149,9 @@ GRID_DAILY_ON_GRID_ENERGY: ['gridSellDayEnergy', float, 3], GRID_DAILY_ON_GRID_ENERGY_STR: ['gridSellDayEnergyStr', str, None], GRID_DAILY_ENERGY_USED: ['homeLoadEnergy', float, 3], - GRID_DAILY_ENERGY_USED_STR: ['homeLoadEnergyStr', str, None] + GRID_DAILY_ENERGY_USED_STR: ['homeLoadEnergyStr', str, None], + GRID_TOTAL_CONSUMPTION_POWER: ['familyLoadPower', float, 3], + GRID_TOTAL_CONSUMPTION_POWER_STR: ['familyLoadPowerStr', str, None] }, }