Skip to content

Commit

Permalink
v2023.11.1 reverting change made in v2023.11.:0 bringing back convers…
Browse files Browse the repository at this point in the history
…ion to metric for throughput and size because calc modules return delta values in metric.. Updating labels to clarify that
  • Loading branch information
jeroenterheerdt committed Nov 10, 2023
1 parent cb37419 commit e6ceb12
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
9 changes: 4 additions & 5 deletions custom_components/smart_irrigation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,14 +637,13 @@ def calculate_module(self, zone,weatherdata, forecastdata):

if data[const.ZONE_BUCKET] < 0:
# calculate duration
#ha_config_is_metric = self.hass.config.units is METRIC_SYSTEM
ha_config_is_metric = self.hass.config.units is METRIC_SYSTEM
tput = zone.get(const.ZONE_THROUGHPUT)
sz = zone.get(const.ZONE_SIZE)
#v2023.11.0: disabling this since this conversion should not matter. the duration is not dependent on metric/imperial
#if not ha_config_is_metric:
if not ha_config_is_metric:
# throughput is in gpm and size is in sq ft since HA is not in metric, so we need to adjust those first!
# tput = convert_between(const.UNIT_GPM,const.UNIT_LPM,tput)
# sz = convert_between(const.UNIT_SQ_FT, const.UNIT_M2, sz)
tput = convert_between(const.UNIT_GPM,const.UNIT_LPM,tput)
sz = convert_between(const.UNIT_SQ_FT, const.UNIT_M2, sz)
precipitation_rate = (tput*60)/sz
#new version of calculation below - this is the old version from V1. Switching to the new version removes the need for ET values to be passed in!
#water_budget = 1
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smart_irrigation/const.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Store constants."""


VERSION = "v2023.11.0"
VERSION = "v2023.11.1"
NAME = "Smart Irrigation"
MANUFACTURER = "@jeroenterheerdt"

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion custom_components/smart_irrigation/frontend/src/const.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const VERSION = "v2023.11.0";
export const VERSION = "v2023.11.1";
export const REPO = "https://github.com/jeroenterheerdt/HASmartIrrigation;";
export const ISSUES_URL = REPO + "/issues";

Expand Down
2 changes: 1 addition & 1 deletion custom_components/smart_irrigation/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/jeroenterheerdt/HASmartIrrigation/issues",
"requirements": [],
"version": "v2023.11.0"
"version": "v2023.11.1"
}
2 changes: 1 addition & 1 deletion custom_components/smart_irrigation/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"module": {
"calculation": {
"explanation": {
"module-returned-evapotranspiration-deficiency": "Note: this explanation uses '.' as decimal separator and shows rounded values. Module returned Evapotranspiration deficiency of",
"module-returned-evapotranspiration-deficiency": "Note: this explanation uses '.' as decimal separator, shows rounded and metric values. Module returned Evapotranspiration deficiency of",
"bucket-was": "Bucket was",
"new-bucket-values-is": "New bucket value is",
"old-bucket-variable": "old_bucket",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/smart_irrigation/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"module": {
"calculation": {
"explanation": {
"module-returned-evapotranspiration-deficiency": "NB: in deze uitleg wordt de '.' as decimaalscheidingsteken gebruikt en worden afgeronde getalleng getoond. Module berekende ET waarde van",
"module-returned-evapotranspiration-deficiency": "NB: in deze uitleg wordt de '.' as decimaalscheidingsteken gebruikt, worden afgeronde en metrische getallen getoond. Module berekende ET waarde van",
"bucket-was": "Voorraad was",
"new-bucket-values-is": "Nieuwe voorraad is",
"old-bucket-variable": "oude_voorraad",
Expand Down

0 comments on commit e6ceb12

Please sign in to comment.