Browse Source

Make the Blind Tilt a sequence device (#206)

Ben Morton 1 year ago
parent
commit
f5ddb1295b
2 changed files with 3 additions and 2 deletions
  1. 1 0
      switchbot/adv_parsers/blind_tilt.py
  2. 2 2
      switchbot/devices/blind_tilt.py

+ 1 - 0
switchbot/adv_parsers/blind_tilt.py

@@ -23,4 +23,5 @@ def process_woblindtilt(
         "inMotion": _in_motion,
         "tilt": (100 - _tilt) if reverse else _tilt,
         "lightLevel": _light_level,
+        "sequence_number": device_data[0]
     }

+ 2 - 2
switchbot/devices/blind_tilt.py

@@ -4,7 +4,7 @@ from __future__ import annotations
 import logging
 from typing import Any
 
-from switchbot.devices.device import REQ_HEADER, update_after_operation
+from switchbot.devices.device import REQ_HEADER, update_after_operation, SwitchbotSequenceDevice
 
 from .curtain import CURTAIN_EXT_SUM_KEY, SwitchbotCurtain
 
@@ -26,7 +26,7 @@ CLOSE_UP_KEYS = [
 ]
 
 
-class SwitchbotBlindTilt(SwitchbotCurtain):
+class SwitchbotBlindTilt(SwitchbotCurtain, SwitchbotSequenceDevice):
     """Representation of a Switchbot Blind Tilt."""
 
     # The position of the blind is saved returned with 0 = closed down, 50 = open and 100 = closed up.