diff --git a/miio/airhumidifier_jsq.py b/miio/airhumidifier_jsq.py index 98f5326e6..c3dee049d 100644 --- a/miio/airhumidifier_jsq.py +++ b/miio/airhumidifier_jsq.py @@ -1,6 +1,6 @@ import enum import logging -from typing import Any, Dict +from typing import Any, Dict, Optional import click @@ -129,6 +129,14 @@ def lid_opened(self) -> bool: """True if the water tank is detached.""" return self.data["lid_opened"] == 1 + @property + def use_time(self) -> Optional[int]: + """How long the device has been active in seconds. + + Not supported by the device, so we return none here. + """ + return None + class AirHumidifierJsq(Device): """Implementation of Xiaomi Zero Fog Humidifier: shuii.humidifier.jsq001.""" diff --git a/miio/airhumidifier_mjjsq.py b/miio/airhumidifier_mjjsq.py index 454deff07..0e24be59a 100644 --- a/miio/airhumidifier_mjjsq.py +++ b/miio/airhumidifier_mjjsq.py @@ -120,6 +120,14 @@ def wet_protection(self) -> Optional[bool]: return None + @property + def use_time(self) -> Optional[int]: + """How long the device has been active in seconds. + + Not supported by the device, so we return none here. + """ + return None + class AirHumidifierMjjsq(Device): """Support for deerma.humidifier.(mj)jsq."""