Skip to content

Commit

Permalink
fix #430
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenterheerdt committed Jul 12, 2024
1 parent fbe7fa9 commit d9eb029
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
26 changes: 15 additions & 11 deletions custom_components/smart_irrigation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ async def set_up_auto_calc_time(self, data):
data[const.CONF_CALC_TIME]
)
)
raise ValueError("Time is not a valid time")
# raise ValueError("Time is not a valid time")
else:
# set OWM client cache to 0
if self._WeatherServiceClient:
Expand Down Expand Up @@ -712,13 +712,20 @@ async def _async_update_all(self, *args):
weatherdata = await self.hass.async_add_executor_job(
self._WeatherServiceClient.get_data
)
# WIP v2024.6.X: disabling this
# experiment: this can be disabled because we switched to subscriptions
# if sensor_in_mapping:
# sensor_values = self.build_sensor_values_for_mapping(mapping)
# weatherdata = await self.merge_weatherdata_and_sensor_values(
# weatherdata, sensor_values
# )
# WIP v2024.6.X: skip this if continuous updates are enabled
the_config = self.store.async_get_config()
if the_config.get(const.CONF_CONTINUOUS_UPDATES):
# if continuous updates are enabled, we do not need to update the mappings here
_LOGGER.debug(
f"Continuous updates are enabled, skipping update for mapping {mapping_id}"
)
continue
else:
if sensor_in_mapping:
sensor_values = self.build_sensor_values_for_mapping(mapping)
weatherdata = await self.merge_weatherdata_and_sensor_values(
weatherdata, sensor_values
)
if static_in_mapping:
static_values = self.build_static_values_for_mapping(mapping)
weatherdata = await self.merge_weatherdata_and_sensor_values(
Expand Down Expand Up @@ -965,9 +972,6 @@ async def async_calculate_zone(self, zone_id, continuous_updates=False):
# if using pyeto and using a forecast o_i_m needs to be set to true!
modinst = await self.getModuleInstanceByID(zone.get(const.ZONE_MODULE))
forecastdata = None
_LOGGER.debug(
f"calculate_zone: modinst.name: {modinst.name} and forecast_days: {modinst._forecast_days}"
)
if modinst and modinst.name == "PyETO" and modinst._forecast_days > 0:
if self.use_weather_service:
# get forecast info from OWM
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,6 +1,6 @@
"""Store constants."""

VERSION = "v2024.7.4"
VERSION = "v2024.7.5"
NAME = "Smart Irrigation"
MANUFACTURER = "@jeroenterheerdt"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11384,7 +11384,7 @@
.narrow=${this.narrow}
></ha-menu-button>
<div class="main-title">${Ci("title", this.hass.language)}</div>
<div class="version">${"v2024.7.4"}</div>
<div class="version">${"v2024.7.5"}</div>
</div>
<ha-tabs
Expand Down
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 = "v2024.7.4";
export const VERSION = "v2024.7.5";
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": "v2024.7.4"
"version": "v2024.7.5"
}

0 comments on commit d9eb029

Please sign in to comment.