J. Nick Koston 1 năm trước cách đây
mục cha
commit
f721c80664
1 tập tin đã thay đổi với 1 bổ sung7 xóa
  1. 1 7
      switchbot/devices/bulb.py

+ 1 - 7
switchbot/devices/bulb.py

@@ -43,7 +43,7 @@ class SwitchbotBulb(SwitchbotDevice):
         self._state: dict[str, Any] = {}
 
     @property
-    def on(self) -> bool:
+    def on(self) -> bool | None:
         """Return if bulb is on."""
         return self.is_on()
 
@@ -125,12 +125,6 @@ class SwitchbotBulb(SwitchbotDevice):
         self._update_state(result)
         return result[1] == 0x80
 
-    async def turn_off(self) -> bool:
-        """Turn device off."""
-        result = await self._sendcommand(BULB_OFF_KEY)
-        self._update_state(result)
-        return result[1] == 0x00
-
     def is_on(self) -> bool | None:
         """Return bulb state from cache."""
         return self._get_adv_value("isOn")