diff --git a/miio/device.py b/miio/device.py index 436d46ef3..2ac4ece1d 100644 --- a/miio/device.py +++ b/miio/device.py @@ -95,6 +95,12 @@ def hardware_version(self) -> Optional[str]: return self.data["hw_ver"] return None + def mac_address(self) -> Optional[str]: + """MAC address if available.""" + if self.data["mac"] is not None: + return self.data["mac"] + return None + @property def raw(self): """Raw data as returned by the device."""