Skip to content

Commit

Permalink
Merge pull request #37 from sh00t2kill/add-start-watering-valve-service
Browse files Browse the repository at this point in the history
Fix API call bug with valve service calls
  • Loading branch information
sh00t2kill authored Feb 28, 2024
2 parents a320abe + 6284b08 commit b82f4d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/linktap/valve.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ 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):
if not minutes or minutes == 0:
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()

0 comments on commit b82f4d5

Please sign in to comment.