Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move raw_id from Vacuum to the Device base class #776

Merged
merged 1 commit into from
Jul 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions miio/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ def info(self) -> DeviceInfo:
"Unable to request miIO.info from the device"
) from ex

@property
def raw_id(self):
"""Return the last used protocol sequence id."""
return self._protocol.raw_id

def update(self, url: str, md5: str):
"""Start an OTA update."""
payload = {
Expand Down
4 changes: 0 additions & 4 deletions miio/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,6 @@ def get_segment_status(self):
"""Get the status of a segment."""
return self.send("get_segment_status")

@property
def raw_id(self):
return self._protocol.raw_id

def name_segment(self):
raise NotImplementedError("unknown parameters")
# return self.send("name_segment")
Expand Down