Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chomupashchuk committed Apr 5, 2020
1 parent 70a79fd commit 5c9ef66
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ariston/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
CONF_HVAC_OFF,
CONF_HVAC_OFF_PRESENT,
CONF_LOCALIZATION,
CONF_DHW_AND_CH,
INVALID_STORAGE_TEMP,
LANG_LOCATION,
DATA_ARISTON,
DEVICES,
Expand Down Expand Up @@ -225,6 +227,11 @@ def hvac_action(self):
if climate_mode != VAL_OFF:
if self._api._ariston_data["zone"]["heatRequest"]:
curr_hvac_action = CURRENT_HVAC_HEAT
if self._api._ariston_data["dhwStorageTemp"] < self._api._ariston_data["dhwTemp"]["value"] and \
self._api._ariston_data["dhwStorageTemp"] != INVALID_STORAGE_TEMP and \
VALUE_TO_MODE[self._api._ariston_data["mode"]] in [VAL_SUMMER, VAL_WINTER] and \
not self._api._device[CONF_DHW_AND_CH]:
curr_hvac_action = CURRENT_HVAC_IDLE
else:
curr_hvac_action = CURRENT_HVAC_IDLE
else:
Expand Down
2 changes: 1 addition & 1 deletion ariston/const.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Constants for Ariston component."""

VERSION = "1.3.8"
VERSION = "1.3.9"

# sensor names and values
SENSOR_ACCOUNT_CH_GAS = "Account CH Gas Use"
Expand Down
3 changes: 2 additions & 1 deletion ariston/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
VALUE_TO_MODE,
VALUE_TO_DHW_MODE,
UNKNOWN_TEMP,
INVALID_STORAGE_TEMP,
)

"""STATE_SCAN_INTERVAL_SECS is used to scan changes in JSON data as command in '__init__' is not for checking and updating sensors"""
Expand Down Expand Up @@ -241,7 +242,7 @@ def device_state_attributes(self):
elif self._api._ariston_data["flameForDhw"]:
action = ACTION_HEATING
elif self._api._ariston_data["dhwStorageTemp"] < self._api._ariston_data["dhwTemp"]["value"] and \
self._api._ariston_data["dhwStorageTemp"] != 0 and \
self._api._ariston_data["dhwStorageTemp"] != INVALID_STORAGE_TEMP and \
VALUE_TO_MODE[self._api._ariston_data["mode"]] in [VAL_SUMMER, VAL_WINTER]:
action = ACTION_HEATING
elif self._api._device[CONF_DHW_FLAME_UNKNOWN_ON] and self._api._ariston_data["flameSensor"]:
Expand Down

0 comments on commit 5c9ef66

Please sign in to comment.