Skip to content

Commit

Permalink
v2024.6.13 adding first version of support for PirateWeather as an al…
Browse files Browse the repository at this point in the history
…ternative to OWM.
  • Loading branch information
jeroenterheerdt committed Jun 16, 2024
1 parent 6908d43 commit 583b448
Show file tree
Hide file tree
Showing 26 changed files with 699 additions and 11,086 deletions.
4 changes: 2 additions & 2 deletions custom_components/smart_irrigation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
entry.data.get(const.CONF_WEATHER_SERVICE_API_VERSION)
)
# check for OWM config and migrate accordingly
if entry.data["use_owm"]:
if "use_owm" in entry.data and entry.data["use_owm"]:
if "owm_api_key" in entry.data:
hass.data[const.DOMAIN][const.CONF_WEATHER_SERVICE_API_KEY] = entry.data[
"owm_api_key"
Expand Down Expand Up @@ -1301,7 +1301,7 @@ def check_mapping_sources(self, mapping_id):
if not isinstance(the_map, str):
if (
the_map.get(const.MAPPING_CONF_SOURCE)
== const.MAPPING_CONF_SOURCE_OWM
== const.MAPPING_CONF_SOURCE_WEATHER_SERVICE
):
owm_in_mapping = True
if (
Expand Down
4 changes: 2 additions & 2 deletions custom_components/smart_irrigation/const.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Store constants."""

VERSION = "v2024.6.12"
VERSION = "v2024.6.13"
NAME = "Smart Irrigation"
MANUFACTURER = "@jeroenterheerdt"

Expand Down Expand Up @@ -149,7 +149,7 @@
MAPPING_TEMPERATURE = "Temperature"
MAPPING_WINDSPEED = "Windspeed"

MAPPING_CONF_SOURCE_OWM = "owm"
MAPPING_CONF_SOURCE_WEATHER_SERVICE = "weather_service"
MAPPING_CONF_SOURCE_SENSOR = "sensor"
MAPPING_CONF_SOURCE_NONE = "none"
MAPPING_CONF_SOURCE_STATIC_VALUE = "static"
Expand Down
Loading

0 comments on commit 583b448

Please sign in to comment.