Skip to content

Commit

Permalink
Revert "Add support for dmaker.fan.p9 and dmaker.fan.p10 (rytilahti#819
Browse files Browse the repository at this point in the history
…)"

This reverts commit a37e4c6.
  • Loading branch information
swim2sun authored Oct 13, 2020
1 parent ae35ad8 commit fa52c64
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 554 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Supported devices
- Xiaomi Philips Zhirui Smart LED Bulb E14 Candle Lamp
- Xiaomi Philips Zhirui Bedroom Smart Lamp
- Xiaomi Universal IR Remote Controller (Chuangmi IR)
- Xiaomi Mi Smart Pedestal Fan V2, V3, SA1, ZA1, ZA3, ZA4, P5, P9, P10
- Xiaomi Mi Smart Pedestal Fan V2, V3, SA1, ZA1, ZA3, ZA4, P5
- Xiaomi Mi Air Humidifier V1, CA1, CA4, CB1, MJJSQ, JSQ001
- Xiaomi Mi Water Purifier (Basic support: Turn on & off)
- Xiaomi PM2.5 Air Quality Monitor V1, B1, S1
Expand Down
7 changes: 0 additions & 7 deletions docs/api/miio.airconditioningcompanionMCN.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/api/miio.fan_common.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/api/miio.fan_miot.rst

This file was deleted.

2 changes: 0 additions & 2 deletions docs/api/miio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ Submodules
miio.exceptions
miio.extract_tokens
miio.fan
miio.fan_common
miio.fan_miot
miio.gateway
miio.heater
miio.miioprotocol
Expand Down
1 change: 0 additions & 1 deletion miio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from miio.device import Device
from miio.exceptions import DeviceError, DeviceException
from miio.fan import Fan, FanP5, FanSA1, FanV2, FanZA1, FanZA4
from miio.fan_miot import FanMiot, FanP9, FanP10
from miio.gateway import Gateway
from miio.heater import Heater
from miio.philips_bulb import PhilipsBulb, PhilipsWhiteBulb
Expand Down
4 changes: 0 additions & 4 deletions miio/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
Cooker,
Device,
Fan,
FanMiot,
Heater,
PhilipsBulb,
PhilipsEyecare,
Expand Down Expand Up @@ -79,7 +78,6 @@
MODEL_FAN_ZA3,
MODEL_FAN_ZA4,
)
from .fan_miot import MODEL_FAN_P9, MODEL_FAN_P10
from .heater import MODEL_HEATER_MA1, MODEL_HEATER_ZA1
from .powerstrip import MODEL_POWER_STRIP_V1, MODEL_POWER_STRIP_V2
from .toiletlid import MODEL_TOILETLID_V1
Expand Down Expand Up @@ -163,8 +161,6 @@
"zhimi-fan-za3": partial(Fan, model=MODEL_FAN_ZA3),
"zhimi-fan-za4": partial(Fan, model=MODEL_FAN_ZA4),
"dmaker-fan-p5": partial(Fan, model=MODEL_FAN_P5),
"dmaker-fan-p9": partial(FanMiot, model=MODEL_FAN_P9),
"dmaker-fan-p10": partial(FanMiot, model=MODEL_FAN_P10),
"tinymu-toiletlid-v1": partial(Toiletlid, model=MODEL_TOILETLID_V1),
"zhimi-airfresh-va2": partial(AirFresh, model=MODEL_AIRFRESH_VA2),
"zhimi-airfresh-va4": partial(AirFresh, model=MODEL_AIRFRESH_VA4),
Expand Down
23 changes: 22 additions & 1 deletion miio/fan.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import enum
import logging
from typing import Any, Dict, Optional

import click

from .click_common import EnumType, command, format_output
from .device import Device
from .fan_common import FanException, LedBrightness, MoveDirection, OperationMode
from .exceptions import DeviceException

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -63,6 +64,26 @@
}


class FanException(DeviceException):
pass


class OperationMode(enum.Enum):
Normal = "normal"
Nature = "nature"


class LedBrightness(enum.Enum):
Bright = 0
Dim = 1
Off = 2


class MoveDirection(enum.Enum):
Left = "left"
Right = "right"


class FanStatus:
"""Container for status reports from the Xiaomi Mi Smart Pedestal Fan."""

Expand Down
23 changes: 0 additions & 23 deletions miio/fan_common.py

This file was deleted.

Loading

0 comments on commit fa52c64

Please sign in to comment.