From 6284b08c6d878035ae7bbf35af14d5028e55280c Mon Sep 17 00:00:00 2001 From: Dan Wheaton Date: Wed, 28 Feb 2024 14:51:42 +1100 Subject: [PATCH] Fix API bug for new service calls --- custom_components/linktap/valve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/linktap/valve.py b/custom_components/linktap/valve.py index 6414ee2..d2800e3 100644 --- a/custom_components/linktap/valve.py +++ b/custom_components/linktap/valve.py @@ -149,7 +149,7 @@ async def _pause_tap(self, hours=False): hours = 1 _LOGGER.debug(f"Pausing {self.entity_id} for {hours} hours") gw_id = self.coordinator.get_gw_id() - await self.tap_api.pause_tap(gw_id, self.tap_id, hours) + await self.coordinator.tap_api.pause_tap(gw_id, self.tap_id, hours) await self.coordinator.async_request_refresh() async def _start_watering(self, minutes=False): @@ -157,5 +157,5 @@ async def _start_watering(self, minutes=False): minutes = 1439 _LOGGER.debug(f"Starting watering via service call for {minutes} minutes") gw_id = self.coordinator.get_gw_id() - await self.tap_api.turn_on(gw_id, self.tap_id, minutes) + await self.coordinator.tap_api.turn_on(gw_id, self.tap_id, minutes) await self.coordinator.async_request_refresh()