Skip to content

Commit

Permalink
Convert a couple of missed/new classes to use new mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Feb 12, 2021
1 parent a09cd65 commit ebc4ca2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 29 deletions.
12 changes: 1 addition & 11 deletions miio/airpurifier_miot.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,17 +505,7 @@ def set_led(self, led: bool):
class AirPurifierMB4(BasicAirPurifierMiot):
"""Main class representing the air purifier which uses MIoT protocol."""

def __init__(
self,
ip: str = None,
token: str = None,
start_id: int = 0,
debug: int = 0,
lazy_discover: bool = True,
) -> None:
super().__init__(
_MODEL_AIRPURIFIER_MB4, ip, token, start_id, debug, lazy_discover
)
mapping = _MODEL_AIRPURIFIER_MB4

@command(
default_output=format_output(
Expand Down
10 changes: 1 addition & 9 deletions miio/airqualitymonitor_miot.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,7 @@ def __repr__(self) -> str:
class AirQualityMonitorCGDN1(MiotDevice):
"""Qingping Air Monitor Lite."""

def __init__(
self,
ip: str = None,
token: str = None,
start_id: int = 0,
debug: int = 0,
lazy_discover: bool = True,
) -> None:
super().__init__(_MAPPING_CGDN1, ip, token, start_id, debug, lazy_discover)
mapping = _MAPPING_CGDN1

@command(
default_output=format_output(
Expand Down
10 changes: 1 addition & 9 deletions miio/yeelight_dual_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,7 @@ class YeelightDualControlModule(MiotDevice):
"""Main class representing the Yeelight Dual Control Module (yeelink.switch.sw1)
which uses MIoT protocol."""

def __init__(
self,
ip: str = None,
token: str = None,
start_id: int = 0,
debug: int = 0,
lazy_discover: bool = True,
) -> None:
super().__init__(_MAPPING, ip, token, start_id, debug, lazy_discover)
mapping = _MAPPING

@command(
default_output=format_output(
Expand Down

0 comments on commit ebc4ca2

Please sign in to comment.