Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

408 v380 battery sensor #411

Merged
merged 4 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/solis/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"domain": "solis",
"version": "3.8.0",
"version": "3.8.1",
"config_flow": true,
"name": "Solis Inverter",
"iot_class": "cloud_polling",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/solis/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
_LOGGER = logging.getLogger(__name__)

# VERSION
VERSION = '3.8.0'
VERSION = '3.8.1'

# ATTRIBUTES
LAST_UPDATED = 'Last updated'
Expand Down
22 changes: 17 additions & 5 deletions custom_components/solis/soliscloud_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
_LOGGER = logging.getLogger(__name__)

# VERSION
VERSION = '0.5.4'
VERSION = '0.5.5'

# API NAME
API_NAME = 'SolisCloud'
Expand Down Expand Up @@ -113,16 +113,22 @@
BAT_CURRENT_STR: ['storageBatteryCurrentStr', str, None],
BAT_VOLTAGE: ['storageBatteryVoltage', float, 2],
BAT_VOLTAGE_STR: ['storageBatteryVoltageStr', str, None],
BAT_TOTAL_ENERGY_CHARGED: ['batteryTotalChargeEnergy', float, 3],
BAT_TOTAL_ENERGY_CHARGED_STR: ['batteryTotalChargeEnergyStr', str, None],
BAT_TOTAL_ENERGY_DISCHARGED: ['batteryTotalDischargeEnergy', float, 3],
BAT_TOTAL_ENERGY_DISCHARGED_STR: ['batteryTotalDischargeEnergyStr', str, None],
BAT_DAILY_ENERGY_CHARGED: ['batteryTodayChargeEnergy', float, 3],
BAT_DAILY_ENERGY_CHARGED_STR: ['batteryTodayChargeEnergyStr', str, None],
BAT_DAILY_ENERGY_DISCHARGED: ['batteryTodayDischargeEnergy', float, 3],
BAT_DAILY_ENERGY_DISCHARGED_STR: ['batteryTodayDischargeEnergyStr', str, None],
BAT_MONTHLY_ENERGY_CHARGED: ['batteryMonthChargeEnergy', float, 3],
BAT_MONTHLY_ENERGY_CHARGED_STR: ['batteryMonthChargeEnergyStr', str, None],
BAT_MONTHLY_ENERGY_DISCHARGED: ['batteryMonthDischargeEnergy', float, 3],
BAT_MONTHLY_ENERGY_DISCHARGED_STR:['batteryMonthDischargeEnergyStr', str, None],
BAT_YEARLY_ENERGY_CHARGED: ['batteryYearChargeEnergy', float, 3],
BAT_YEARLY_ENERGY_CHARGED_STR: ['batteryYearChargeEnergyStr', str, None],
BAT_YEARLY_ENERGY_DISCHARGED: ['batteryYearDischargeEnergy', float, 3],
BAT_YEARLY_ENERGY_DISCHARGED_STR: ['batteryYearDischargeEnergyStr', str, None],
BAT_TOTAL_ENERGY_CHARGED: ['batteryTotalChargeEnergy', float, 3],
BAT_TOTAL_ENERGY_CHARGED_STR: ['batteryTotalChargeEnergyStr', str, None],
BAT_TOTAL_ENERGY_DISCHARGED: ['batteryTotalDischargeEnergy', float, 3],
BAT_TOTAL_ENERGY_DISCHARGED_STR: ['batteryTotalDischargeEnergyStr', str, None],
#GRID_DAILY_ON_GRID_ENERGY: ['gridSellTodayEnergy', float, 2], #On Plant detail
#GRID_DAILY_ON_GRID_ENERGY_STR: ['gridSellTodayEnergyStr', str, None], #On Plant detail
#GRID_DAILY_ENERGY_PURCHASED: ['gridPurchasedTodayEnergy', float, 2], #On Plant detail
Expand Down Expand Up @@ -479,6 +485,12 @@ def _post_process(self) -> None:
self._fix_units(BAT_POWER, BAT_POWER_STR)
self._fix_units(BAT_CURRENT, BAT_CURRENT_STR)
self._fix_units(BAT_VOLTAGE, BAT_VOLTAGE_STR)
self._fix_units(BAT_DAILY_ENERGY_CHARGED, BAT_DAILY_ENERGY_CHARGED_STR)
self._fix_units(BAT_DAILY_ENERGY_DISCHARGED, BAT_DAILY_ENERGY_DISCHARGED_STR)
self._fix_units(BAT_MONTHLY_ENERGY_CHARGED, BAT_MONTHLY_ENERGY_CHARGED_STR)
self._fix_units(BAT_MONTHLY_ENERGY_DISCHARGED, BAT_MONTHLY_ENERGY_DISCHARGED_STR)
self._fix_units(BAT_YEARLY_ENERGY_CHARGED, BAT_YEARLY_ENERGY_CHARGED_STR)
self._fix_units(BAT_YEARLY_ENERGY_DISCHARGED, BAT_YEARLY_ENERGY_DISCHARGED_STR)
self._fix_units(BAT_TOTAL_ENERGY_CHARGED, BAT_TOTAL_ENERGY_CHARGED_STR)
self._fix_units(BAT_TOTAL_ENERGY_DISCHARGED, BAT_TOTAL_ENERGY_DISCHARGED_STR)
self._fix_units(GRID_TOTAL_CONSUMPTION_POWER, GRID_TOTAL_CONSUMPTION_POWER_STR)
Expand Down
8 changes: 7 additions & 1 deletion custom_components/solis/soliscloud_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .ginlong_const import *

# VERSION
VERSION = '0.1.6'
VERSION = '0.1.7'

STRING_COUNT = 'dcStringCount'
STRING_LISTS = [
Expand All @@ -28,6 +28,12 @@
INVERTER_ENERGY_THIS_YEAR_STR = 'energyThisYearUnit'
INVERTER_ENERGY_TOTAL_LIFE_STR = 'energyTotalLifeUnit'
BAT_POWER_STR = 'batteryPowerUnit'
BAT_DAILY_ENERGY_CHARGED_STR = 'batteryTodayChargeEnergyUnit'
BAT_DAILY_ENERGY_DISCHARGED_STR = 'batteryTodayDischargeEnergyUnit'
BAT_MONTHLY_ENERGY_CHARGED_STR = 'batteryMonthChargeEnergyUnit'
BAT_MONTHLY_ENERGY_DISCHARGED_STR = 'batteryMonthDischargeEnergyUnit'
BAT_YEARLY_ENERGY_CHARGED_STR = 'batteryYearChargeEnergyUnit'
BAT_YEARLY_ENERGY_DISCHARGED_STR = 'batteryYearDischargeEnergyUnit'
BAT_TOTAL_ENERGY_CHARGED_STR = 'batteryTotalChargeEnergyUnit'
BAT_TOTAL_ENERGY_DISCHARGED_STR = 'batteryTotalDischargeEnergyUnit'
BAT_CURRENT_STR = 'batteryCurrentUnit'
Expand Down
Loading