Skip to content
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
10 changes: 9 additions & 1 deletion miio/airhumidifier_jsq.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import enum
import logging
from typing import Any, Dict
from typing import Any, Dict, Optional

import click

Expand Down Expand Up @@ -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."""
Expand Down
8 changes: 8 additions & 0 deletions miio/airhumidifier_mjjsq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down