Skip to content

Commit

Permalink
dhw_flame detection
Browse files Browse the repository at this point in the history
  • Loading branch information
chomupashchuk committed Apr 5, 2020
1 parent 2de1366 commit 175a447
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Store contents of `icons` folder in `\config\www\icons` folder. Since builtin ic
- `units` - which uniots to be used. Values are: `metric` (°C-bar-kW...), `imperial` (°F-psi-kBtu/h...), `auto` (detect automatically, which takes additional time). Default is `metric`.
- `polling_rate` - indicates timers to be used to read or set data. Values are `normal` and `long`. Long means waiting longer for http replies and longer delays between the requests, which might be beneficial in case of slow Ariston responces due to internet connection for example. Default is `normal` to have faster responces.
- `init_during_start` - indicates if integration data shall be fetched during Home Assistant start to have valid data when Home Assistant is started (no guarantee that it will succeeed). Value `true` delays the start time for longer and `false` for lesser period of time but initially all entities will be unavailable until data is fetched. Default value is `true`.
- `dhw_flame_unknown_as_on` - indicates if unknown value of DHW to be tretaed as ON or OFF (gateway has position for DHW flame but it is never set, so intead value is based on `ch_flame` and `dhw_flame`). Default value is `false`.
- `dhw_flame_unknown_as_on` - indicates if unknown value of DHW to be tretaed as ON or OFF (gateway has position for DHW flame but it is never set, so intead value is based on `ch_flame` and `dhw_flame` and storage temperature if it is valid). Default value is `false`.

#### Switches
- `power` - turn power off and on (on value is defined by `power_on` attribute).
Expand Down Expand Up @@ -109,7 +109,7 @@ Store contents of `icons` folder in `\config\www\icons` folder. Since builtin ic
- `ch_flame` - if CH heating is ongoing.
- `ch_pilot` - CH Pilot mode.
- `changing_data` - if change of data via Home Assistant is ongoing.
- `dhw_flame` - if DHW heating is ongoing.
- `dhw_flame` - if DHW heating is ongoing (not fetched but calculated based on `ch_flame`, `flame`, and if valid then `dhw_storage_temperature` and `dhw_set_temperature`, and `dhw_flame_unknown_as_on` for invalid `dhw_storage_temperature`).
- `dhw_thermal_cleanse_function` - DHW thermal cleanse function enabled.
- `flame` - if any type of heating water (DHW or CH).
- `heat_pump` - if heating pump is ON. Not supported on all models.
Expand Down
14 changes: 7 additions & 7 deletions ariston/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,11 @@
BINARY_SENSOR_CH_PILOT,
BINARY_SENSOR_UPDATE,
VERSION,
GET_REQUEST_CH_PROGRAM,
GET_REQUEST_CURRENCY,
GET_REQUEST_DHW_PROGRAM,
GET_REQUEST_ERRORS,
GET_REQUEST_GAS,
GET_REQUEST_MAIN,
GET_REQUEST_PARAM,
GET_REQUEST_UNITS,
GET_REQUEST_VERSION,
VALUE_TO_MODE,
VAL_SUMMER,
VAL_WINTER,
)
from .exceptions import AristonError
from .helpers import log_update_error, service_signal
Expand Down Expand Up @@ -266,6 +262,10 @@ def update(self):
self._state = True
elif self._api._device[CONF_DHW_FLAME_UNKNOWN_ON] and self._api._ariston_data["flameSensor"]:
self._state = True
elif self._api._ariston_data["dhwStorageTemp"] < self._api._ariston_data["dhwTemp"]["value"] and \
self._api._ariston_data["dhwStorageTemp"] != 0 and \
VALUE_TO_MODE[self._api._ariston_data["mode"]] in [VAL_SUMMER, VAL_WINTER]:
self._state = True
except:
pass

Expand Down
3 changes: 2 additions & 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.5"
VERSION = "1.3.6"

# sensor names and values
SENSOR_ACCOUNT_CH_GAS = "Account CH Gas Use"
Expand Down Expand Up @@ -197,6 +197,7 @@
PARAM_HEAT_PUMP,
PARAM_CH_PILOT,
PARAM_CH_FLAME,
PARAM_DHW_FLAME,
PARAM_FLAME
]
GET_REQUEST_PARAM = [
Expand Down
9 changes: 6 additions & 3 deletions ariston/water_heater.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Support for Ariston water heaters."""
import logging
from datetime import timedelta
import json
import logging
import os
from datetime import timedelta

from homeassistant.components.water_heater import (
SUPPORT_OPERATION_MODE,
Expand Down Expand Up @@ -41,7 +41,6 @@
VAL_MANUAL,
VAL_PROGRAM,
VAL_AUTO,
VAL_METRIC,
VAL_IMPERIAL,
VALUE_TO_MODE,
VALUE_TO_DHW_MODE,
Expand Down Expand Up @@ -243,6 +242,10 @@ def device_state_attributes(self):
action = ACTION_HEATING
elif self._api._device[CONF_DHW_FLAME_UNKNOWN_ON] and self._api._ariston_data["flameSensor"]:
action = ACTION_HEATING
elif self._api._ariston_data["dhwStorageTemp"] < self._api._ariston_data["dhwTemp"]["value"] and \
self._api._ariston_data["dhwStorageTemp"] != 0 and \
VALUE_TO_MODE[self._api._ariston_data["mode"]] in [VAL_SUMMER, VAL_WINTER]:
action = ACTION_HEATING
except:
pass
data = {"target_temp_step": 1.0, "hvac_action": action}
Expand Down

0 comments on commit 175a447

Please sign in to comment.