From 91f91b13f551b3b0dbcdc209a818f6132f42a4b0 Mon Sep 17 00:00:00 2001 From: ollo69 Date: Wed, 28 Feb 2024 22:33:38 +0000 Subject: [PATCH] Remove pause service (can use button press service) --- custom_components/smartthinq_sensors/sensor.py | 13 ------------- custom_components/smartthinq_sensors/services.yaml | 8 -------- 2 files changed, 21 deletions(-) diff --git a/custom_components/smartthinq_sensors/sensor.py b/custom_components/smartthinq_sensors/sensor.py index c1aedd95..e52738be 100644 --- a/custom_components/smartthinq_sensors/sensor.py +++ b/custom_components/smartthinq_sensors/sensor.py @@ -69,7 +69,6 @@ # service definition SERVICE_REMOTE_START = "remote_start" SERVICE_WAKE_UP = "wake_up" -SERVICE_PAUSE = "pause" SERVICE_SET_TIME = "set_time" # supported features @@ -595,12 +594,6 @@ def _async_discover_device(lge_devices: dict) -> None: "async_wake_up", [SUPPORT_WM_SERVICES], ) - platform.async_register_entity_service( - SERVICE_PAUSE, - {}, - "async_pause", - [SUPPORT_WM_SERVICES], - ) platform.async_register_entity_service( SERVICE_SET_TIME, {vol.Optional("time_wanted"): cv.time}, @@ -715,12 +708,6 @@ async def async_wake_up(self): raise NotImplementedError() await self._api.device.wake_up() - async def async_pause(self): - """Call the pause command for WM devices.""" - if self._api.type not in WM_DEVICE_TYPES: - raise NotImplementedError() - await self._api.device.pause() - async def async_set_time(self, time_wanted: time | None = None): """Call the set time command for Microwave devices.""" if self._api.type not in SET_TIME_DEVICE_TYPES: diff --git a/custom_components/smartthinq_sensors/services.yaml b/custom_components/smartthinq_sensors/services.yaml index b1d27491..f5c10224 100644 --- a/custom_components/smartthinq_sensors/services.yaml +++ b/custom_components/smartthinq_sensors/services.yaml @@ -21,14 +21,6 @@ wake_up: integration: smartthinq_sensors domain: sensor -pause: - name: Pause - description: Send to ThinQ device the pause command. - target: - entity: - integration: smartthinq_sensors - domain: sensor - set_time: name: Set time description: Set time device.