Skip to content

Commit

Permalink
Device info extended by two additional properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Sep 7, 2017
1 parent 3cd4b30 commit d56b664
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mirobo/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ def model(self) -> Optional[str]:
return self.data["model"]
return None

@property
def firmware_version(self) -> Optional[str]:
if self.data["fw_ver"] is not None:
return self.data["fw_ver"]
return None

@property
def hardware_version(self) -> Optional[str]:
if self.data["hw_ver"] is not None:
return self.data["hw_ver"]
return None

@property
def raw(self):
"""Return raw data returned by the device."""
Expand Down

0 comments on commit d56b664

Please sign in to comment.