Skip to content

Commit

Permalink
fix issue #17 (unable to adjust rainfall amount alone)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcofoni committed Dec 1, 2023
1 parent d59865e commit 5ac6f93
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions custom_components/netro_watering/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@
# Here is the list of the platforms that we want to support.
# sensor is for the netro ground sensors, switch is for the zones
# PLATFORMS: list[Platform] = [Platform.SENSOR, Platform.SWITCH]
PLATFORMS: list[Platform] = [Platform.SENSOR, Platform.SWITCH, Platform.BINARY_SENSOR, Platform.CALENDAR]
PLATFORMS: list[Platform] = [
Platform.SENSOR,
Platform.SWITCH,
Platform.BINARY_SENSOR,
Platform.CALENDAR,
]


_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -390,7 +395,9 @@ async def report_weather(call: ServiceCall) -> None:
{
"controller": coordinator.name,
"date": str(weather_asof) if weather_asof else weather_asof,
"condition": weather_condition.value,
"condition": weather_condition.value
if weather_condition is not None
else None,
"rain": weather_rain,
"rain_prob": weather_rain_prob,
"temp": weather_temp,
Expand All @@ -414,7 +421,7 @@ async def report_weather(call: ServiceCall) -> None:
netro_report_weather,
key,
str(weather_asof),
weather_condition.value,
weather_condition.value if weather_condition is not None else None,
weather_rain,
weather_rain_prob,
weather_temp,
Expand Down

0 comments on commit 5ac6f93

Please sign in to comment.