diff --git a/miio/__init__.py b/miio/__init__.py index b677f4bf0..fad5ec29a 100644 --- a/miio/__init__.py +++ b/miio/__init__.py @@ -34,12 +34,15 @@ from miio.heater import Heater from miio.heater_miot import HeaterMiot from miio.huizuo import Huizuo, HuizuoLampFan, HuizuoLampHeater, HuizuoLampScene -from miio.integrations.airpurifier.airdog import AirDogX3 -from miio.integrations.airpurifier.dmaker import AirFreshA1, AirFreshT2017 -from miio.integrations.airpurifier.zhimi import AirFresh, AirPurifier, AirPurifierMiot -from miio.integrations.fan.dmaker import Fan1C, FanMiot, FanP5 -from miio.integrations.fan.leshow import FanLeshow -from miio.integrations.fan.zhimi import Fan, FanZA5 +from miio.integrations.airpurifier import ( + AirDogX3, + AirFresh, + AirFreshA1, + AirFreshT2017, + AirPurifier, + AirPurifierMiot, +) +from miio.integrations.fan import Fan, Fan1C, FanLeshow, FanMiot, FanP5, FanZA5 from miio.integrations.humidifier import ( AirHumidifier, AirHumidifierJsq, @@ -47,7 +50,7 @@ AirHumidifierMiot, AirHumidifierMjjsq, ) -from miio.integrations.light.philips import ( +from miio.integrations.light import ( Ceil, PhilipsBulb, PhilipsEyecare, @@ -56,9 +59,14 @@ PhilipsWhiteBulb, ) from miio.integrations.petwaterdispenser import PetWaterDispenser -from miio.integrations.vacuum.dreame.dreamevacuum_miot import DreameVacuum -from miio.integrations.vacuum.mijia import G1Vacuum -from miio.integrations.vacuum.roborock import RoborockVacuum, VacuumException +from miio.integrations.vacuum import ( + DreameVacuum, + G1Vacuum, + RoborockVacuum, + RoidmiVacuumMiot, + VacuumException, + ViomiVacuum, +) from miio.integrations.vacuum.roborock.vacuumcontainers import ( CleaningDetails, CleaningSummary, @@ -67,8 +75,6 @@ Timer, VacuumStatus, ) -from miio.integrations.vacuum.roidmi.roidmivacuum_miot import RoidmiVacuumMiot -from miio.integrations.vacuum.viomi.viomivacuum import ViomiVacuum from miio.integrations.yeelight import Yeelight from miio.powerstrip import PowerStrip from miio.protocol import Message, Utils diff --git a/miio/discovery.py b/miio/discovery.py index 68be7f3a6..32fac78c9 100644 --- a/miio/discovery.py +++ b/miio/discovery.py @@ -21,6 +21,7 @@ AirHumidifierJsqs, AirHumidifierMjjsq, ) +from miio.integrations.vacuum import DreameVacuum, RoborockVacuum, ViomiVacuum from miio.integrations.yeelight import Yeelight from . import ( @@ -35,19 +36,10 @@ ChuangmiPlug, Cooker, Device, - DreameVacuum, - FanLeshow, Gateway, Heater, - PhilipsBulb, - PhilipsEyecare, - PhilipsMoonlight, - PhilipsRwread, - PhilipsWhiteBulb, PowerStrip, - RoborockVacuum, Toiletlid, - ViomiVacuum, WaterPurifier, WaterPurifierYunmi, WifiRepeater, @@ -75,8 +67,14 @@ MODEL_CHUANGMI_PLUG_V3, ) from .heater import MODEL_HEATER_MA1, MODEL_HEATER_ZA1 -from .integrations.fan.dmaker import FanMiot -from .integrations.fan.zhimi import Fan, FanZA5 +from .integrations.fan import Fan, FanLeshow, FanMiot, FanZA5 +from .integrations.light import ( + PhilipsBulb, + PhilipsEyecare, + PhilipsMoonlight, + PhilipsRwread, + PhilipsWhiteBulb, +) from .powerstrip import MODEL_POWER_STRIP_V1, MODEL_POWER_STRIP_V2 from .toiletlid import MODEL_TOILETLID_V1 diff --git a/miio/integrations/fan/__init__.py b/miio/integrations/fan/__init__.py index e69de29bb..f34286872 100644 --- a/miio/integrations/fan/__init__.py +++ b/miio/integrations/fan/__init__.py @@ -0,0 +1,4 @@ +# flake8: noqa +from .dmaker import * +from .leshow import * +from .zhimi import * diff --git a/miio/integrations/light/__init__.py b/miio/integrations/light/__init__.py index e69de29bb..343acf030 100644 --- a/miio/integrations/light/__init__.py +++ b/miio/integrations/light/__init__.py @@ -0,0 +1,2 @@ +# flake8: noqa +from .philips import * diff --git a/miio/integrations/vacuum/__init__.py b/miio/integrations/vacuum/__init__.py index e69de29bb..0718196e4 100644 --- a/miio/integrations/vacuum/__init__.py +++ b/miio/integrations/vacuum/__init__.py @@ -0,0 +1,6 @@ +# flake8: noqa +from .dreame import * +from .mijia import * +from .roborock import * +from .roidmi import * +from .viomi import * diff --git a/miio/integrations/vacuum/dreame/__init__.py b/miio/integrations/vacuum/dreame/__init__.py index e69de29bb..0b4ded8c6 100644 --- a/miio/integrations/vacuum/dreame/__init__.py +++ b/miio/integrations/vacuum/dreame/__init__.py @@ -0,0 +1,2 @@ +# flake8: noqa +from .dreamevacuum_miot import DreameVacuum diff --git a/miio/integrations/vacuum/roidmi/__init__.py b/miio/integrations/vacuum/roidmi/__init__.py index e69de29bb..75f051701 100644 --- a/miio/integrations/vacuum/roidmi/__init__.py +++ b/miio/integrations/vacuum/roidmi/__init__.py @@ -0,0 +1,2 @@ +# flake8: noqa +from .roidmivacuum_miot import RoidmiVacuumMiot diff --git a/miio/integrations/vacuum/viomi/__init__.py b/miio/integrations/vacuum/viomi/__init__.py index e69de29bb..2e5c1ba7d 100644 --- a/miio/integrations/vacuum/viomi/__init__.py +++ b/miio/integrations/vacuum/viomi/__init__.py @@ -0,0 +1,2 @@ +# flake8: noqa +from .viomivacuum import ViomiVacuum