Skip to content

Commit

Permalink
v2024.8.1-beta-11 fix #473 (static module on new installs resulted in…
Browse files Browse the repository at this point in the history
… error)
  • Loading branch information
jeroenterheerdt committed Aug 23, 2024
1 parent 5c0d841 commit f0ebc92
Show file tree
Hide file tree
Showing 5 changed files with 10,813 additions and 363 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
DEFAULT_DELTA = 0.0
SCHEMA = vol.Schema(
{
vol.Required(CONF_DELTA, default=DEFAULT_DELTA): vol.Coerce(float),
vol.Required(CONF_DELTA, default=DEFAULT_DELTA): vol.Coerce(str, float),
}
)

Expand All @@ -27,7 +27,10 @@ def __init__(self, hass, description, config: {}) -> None:
)
self._delta = DEFAULT_DELTA
if config:
self._delta = float(config.get(CONF_DELTA, DEFAULT_DELTA))
if config.get(CONF_DELTA) == "":
self._delta = DEFAULT_DELTA
else:
self._delta = float(config.get(CONF_DELTA, DEFAULT_DELTA))

def calculate(self):
return self._delta
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.8.1-beta-10"
VERSION = "v2024.8.1-beta-11"
NAME = "Smart Irrigation"
MANUFACTURER = "@jeroenterheerdt"

Expand Down
Loading

0 comments on commit f0ebc92

Please sign in to comment.