Skip to content

Commit

Permalink
fix erroneous fetch of etoday from plant/station (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
hultenvp authored Nov 17, 2024
1 parent 5538814 commit 8bed218
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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.3'
VERSION = '0.5.4'

# API NAME
API_NAME = 'SolisCloud'
Expand Down Expand Up @@ -386,7 +386,7 @@ def _collect_inverter_data(self, payload: dict[str, Any]) -> None:
precision = attributes[dictkey][2]
if key is not None:
value = None
if key != INVERTER_ENERGY_TODAY or collect_energy_today:
if dictkey != INVERTER_ENERGY_TODAY or collect_energy_today:
value = self._get_value(payload, key, type_, precision)
if value is not None:
self._data[dictkey] = value
Expand Down Expand Up @@ -431,7 +431,7 @@ def _collect_station_list_data(self, payload: dict[str, Any]) -> None:
precision = attributes[dictkey][2]
if key is not None:
value = None
if key != INVERTER_ENERGY_TODAY or collect_energy_today:
if dictkey != INVERTER_ENERGY_TODAY or collect_energy_today:
value = self._get_value(jsondata, key, type_, precision)
if value is not None:
self._data[dictkey] = value
Expand All @@ -455,7 +455,7 @@ def _collect_plant_data(self, payload: dict[str, Any]) -> None:
precision = attributes[dictkey][2]
if key is not None:
value = None
if key != INVERTER_ENERGY_TODAY or collect_energy_today:
if dictkey != INVERTER_ENERGY_TODAY or collect_energy_today:
value = self._get_value(jsondata, key, type_, precision)
if value is not None:
self._data[dictkey] = value
Expand Down

0 comments on commit 8bed218

Please sign in to comment.