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

Gateway: add name + model property to subdevice & add loads of subdevices #724

Merged
merged 12 commits into from
Jun 13, 2020
5 changes: 5 additions & 0 deletions miio/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@ def device_type(self):
"""Return the device type name."""
return self.type.name

@property
def name(self):
"""Return the name of the device."""
return f"{self.device_type}-{self.sid}"
starkillerOG marked this conversation as resolved.
Show resolved Hide resolved

@property
def model(self):
"""Return the device model."""
Expand Down