Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix spelling of Midea in all instances #588

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions custom_components/midea_ac_lan/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from homeassistant.helpers.aiohttp_client import async_create_clientsession
from .midea.core.discover import discover
from .midea.core.cloud import get_midea_cloud
from .midea.core.device import MiedaDevice
from .midea.core.device import MideaDevice
from .midea_devices import MIDEA_DEVICES

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -264,7 +264,7 @@ async def async_step_auto(self, user_input=None, error=None):
return await self.async_step_auto(error="preset_account")
keys = await self.cloud.get_keys(user_input[CONF_DEVICE])
for method, key in keys.items():
dm = MiedaDevice(
dm = MideaDevice(
name="",
device_id=device_id,
device_type=device.get(CONF_TYPE),
Expand Down Expand Up @@ -314,7 +314,7 @@ async def async_step_manually(self, user_input=None, error=None):
return await self.async_step_manually(error="invalid_token")
if user_input[CONF_PROTOCOL] == 3 and (len(user_input[CONF_TOKEN]) == 0 or len(user_input[CONF_KEY]) == 0):
return await self.async_step_manually(error="invalid_token")
dm = MiedaDevice(
dm = MideaDevice(
name="",
device_id=user_input[CONF_DEVICE_ID],
device_type=user_input[CONF_TYPE],
Expand Down
2 changes: 1 addition & 1 deletion custom_components/midea_ac_lan/midea/core/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ParseMessageResult(IntEnum):
ERROR = 99


class MiedaDevice(threading.Thread):
class MideaDevice(threading.Thread):
def __init__(self,
name: str,
device_id: int,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/a1/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -29,7 +29,7 @@ class DeviceAttributes(StrEnum):
current_temperature = "current_temperature"


class MideaA1Device(MiedaDevice):
class MideaA1Device(MideaDevice):
_modes = [
"Manual", "Continuous", "Auto", "Clothes-Dry", "Shoes-Dry"
]
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/ac/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -56,7 +56,7 @@ class DeviceAttributes(StrEnum):
realtime_power = "realtime_power"


class MideaACDevice(MiedaDevice):
class MideaACDevice(MideaDevice):
_fresh_air_fan_speeds = {
0: "Off", 20: "Silent", 40: "Low", 60: "Medium", 80: "High", 100: "Full"
}
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/b0/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -22,7 +22,7 @@ class DeviceAttributes(StrEnum):
water_shortage = "water_shortage"


class MideaB0Device(MiedaDevice):
class MideaB0Device(MideaDevice):
_status = {
0x01: "Standby", 0x02: "Idle", 0x03: "Working",
0x04: "Finished", 0x05: "Delay", 0x06: "Paused"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/b1/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -22,7 +22,7 @@ class DeviceAttributes(StrEnum):
water_shortage = "water_shortage"


class MideaB1Device(MiedaDevice):
class MideaB1Device(MideaDevice):
_status = {
0x01: "Standby", 0x02: "Idle", 0x03: "Working",
0x04: "Finished", 0x05: "Delay", 0x06: "Paused"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/b3/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -37,7 +37,7 @@ class DeviceAttributes(StrEnum):
lock = "lock"


class MideaB2Device(MiedaDevice):
class MideaB2Device(MideaDevice):
_status = {
0x00: "Off", 0x01: "Standby", 0x02: "Working",
0x03: "Delay", 0x04: "Finished"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/b4/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -22,7 +22,7 @@ class DeviceAttributes(StrEnum):
water_shortage = "water_shortage"


class MideaB4Device(MiedaDevice):
class MideaB4Device(MideaDevice):
_status = {
0x01: "Standby", 0x02: "Idle", 0x03: "Working",
0x04: "Finished", 0x05: "Delay", 0x06: "Paused"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/b6/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -24,7 +24,7 @@ class DeviceAttributes(StrEnum):
cleaning_reminder = "cleaning_reminder"


class MideaB6Device(MiedaDevice):
class MideaB6Device(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/bf/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -22,7 +22,7 @@ class DeviceAttributes(StrEnum):
water_shortage = "water_shortage"


class MideaBFDevice(MiedaDevice):
class MideaBFDevice(MideaDevice):
_status = {
0x01: "PowerSave", 0x02: "Standby", 0x03: "Working",
0x04: "Finished", 0x05: "Delay", 0x06: "Paused"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/c2/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -31,7 +31,7 @@ class DeviceAttributes(StrEnum):
filter_life = "filter_life"


class MideaC2Device(MiedaDevice):
class MideaC2Device(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/c3/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -58,7 +58,7 @@ class DeviceAttributes(StrEnum):
error_code = "error_code"


class MideaC3Device(MiedaDevice):
class MideaC3Device(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/ca/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -33,7 +33,7 @@ class DeviceAttributes(StrEnum):
flex_zone_door = "flex_zone_door"


class MideaCADevice(MiedaDevice):
class MideaCADevice(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/cc/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -32,7 +32,7 @@ class DeviceAttributes(StrEnum):
temp_fahrenheit = "temp_fahrenheit"


class MideaCCDevice(MiedaDevice):
class MideaCCDevice(MideaDevice):
_fan_speeds_7level = {
0x01: "Level 1", 0x02: "Level 2", 0x04: "Level 3",
0x08: "Level 4", 0x10: "Level 5", 0x20: "Level 6",
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/cd/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -27,7 +27,7 @@ class DeviceAttributes(StrEnum):
compressor_status = "compressor_status"


class MideaCDDevice(MiedaDevice):
class MideaCDDevice(MideaDevice):
_modes = ["Energy-save", "Standard", "Dual", "Smart"]

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/ce/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -35,7 +35,7 @@ class DeviceAttributes(StrEnum):
error_code = "error_code"


class MideaCEDevice(MiedaDevice):
class MideaCEDevice(MideaDevice):
_modes = [
"Normal", "Sleep mode", "ECO mode"
]
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/cf/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -23,7 +23,7 @@ class DeviceAttributes(StrEnum):
min_temperature = "min_temperature"


class MideaCFDevice(MiedaDevice):
class MideaCFDevice(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/da/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -34,7 +34,7 @@ class DeviceAttributes(StrEnum):
detergent = "detergent"


class MideaDADevice(MiedaDevice):
class MideaDADevice(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/db/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -22,7 +22,7 @@ class DeviceAttributes(StrEnum):
time_remaining = "time_remaining"


class MideaDBDevice(MiedaDevice):
class MideaDBDevice(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/dc/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -22,7 +22,7 @@ class DeviceAttributes(StrEnum):
time_remaining = "time_remaining"


class MideaDADevice(MiedaDevice):
class MideaDADevice(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/e1/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -42,7 +42,7 @@ class DeviceAttributes(StrEnum):
bright = "bright"


class MideaE1Device(MiedaDevice):
class MideaE1Device(MideaDevice):
def __init__(
self,
name: str,
Expand Down
4 changes: 2 additions & 2 deletions custom_components/midea_ac_lan/midea/devices/e2/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from enum import StrEnum
except ImportError:
from ...backports.enum import StrEnum
from ...core.device import MiedaDevice
from ...core.device import MideaDevice

_LOGGER = logging.getLogger(__name__)

Expand All @@ -30,7 +30,7 @@ class DeviceAttributes(StrEnum):
heating_power = "heating_power"


class MideaE2Device(MiedaDevice):
class MideaE2Device(MideaDevice):
def __init__(
self,
name: str,
Expand Down
Loading