mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-12-28 07:17:11 +00:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66babf8c43 | ||
|
|
1f0662154a | ||
|
|
7080958674 | ||
|
|
1cfd16d1ff | ||
|
|
0f27dfee71 | ||
|
|
0f2cfc14ad | ||
|
|
a90d1093ad | ||
|
|
ddfc18cc2b | ||
|
|
3f0ec3faa9 | ||
|
|
b8104a8643 | ||
|
|
98ebac5516 | ||
|
|
bf7345d680 | ||
|
|
df01bc7cb5 | ||
|
|
61b33e4ceb | ||
|
|
8714549f90 | ||
|
|
266419e3a9 | ||
|
|
7fee90b1fd | ||
|
|
a0c1423933 | ||
|
|
7fac466875 | ||
|
|
e5bbcfca94 | ||
|
|
ff39911d1e | ||
|
|
e5dbd87802 | ||
|
|
00f493d06a | ||
|
|
55f7bdbda8 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -155,6 +155,7 @@ cython_debug/
|
|||||||
|
|
||||||
decrypt_lua.py
|
decrypt_lua.py
|
||||||
test.py
|
test.py
|
||||||
|
test_cloud.py
|
||||||
*.lua
|
*.lua
|
||||||
|
|
||||||
time.py
|
time.py
|
||||||
@@ -33,6 +33,7 @@ Get devices from MSmartHome/Midea Meiju homes through the network and control th
|
|||||||
- T0xB7 Gas Stove
|
- T0xB7 Gas Stove
|
||||||
- T0xB8 Smart Robot Vacuum
|
- T0xB8 Smart Robot Vacuum
|
||||||
- T0xBF Microwave Steam Oven
|
- T0xBF Microwave Steam Oven
|
||||||
|
- T0xC3 Heat Pump
|
||||||
- T0xCA French Door Refrigerator
|
- T0xCA French Door Refrigerator
|
||||||
- T0xCC Central Air Conditioning (Ducted) Wi-Fi Controller
|
- T0xCC Central Air Conditioning (Ducted) Wi-Fi Controller
|
||||||
- T0xCD Air Energy Water Heater
|
- T0xCD Air Energy Water Heater
|
||||||
@@ -45,6 +46,7 @@ Get devices from MSmartHome/Midea Meiju homes through the network and control th
|
|||||||
- T0xE1 Dishwasher
|
- T0xE1 Dishwasher
|
||||||
- T0xE2 Electric Water Heater
|
- T0xE2 Electric Water Heater
|
||||||
- T0xE3 Constant Temperature Gas Water Heater
|
- T0xE3 Constant Temperature Gas Water Heater
|
||||||
|
- T0xE6 Wall hanging furnace
|
||||||
- T0xEA Rice Cooker
|
- T0xEA Rice Cooker
|
||||||
- T0xED Water Softener
|
- T0xED Water Softener
|
||||||
- T0xFA Electric Fan
|
- T0xFA Electric Fan
|
||||||
@@ -60,7 +62,7 @@ Collaboration method: After adding this plugin, find devices that are not correc
|
|||||||
|
|
||||||
Expand the `Attributes` card below and submit these fields with the issue. Pay special attention to the `Device type` and `Subtype` fields, as these are the basis for obtaining the corresponding lua files for device control.
|
Expand the `Attributes` card below and submit these fields with the issue. Pay special attention to the `Device type` and `Subtype` fields, as these are the basis for obtaining the corresponding lua files for device control.
|
||||||
|
|
||||||
Then go to the Home Assistant installation directory, find the device's corresponding T_0000_`Device type`_`Subtype`_***.lua file in the `.storage/midea_auto_cloud/lua/` directory, and wait for adaptation.
|
Then go to the Home Assistant installation directory, find the device's corresponding T_0000_`Device type`_`Subtype`_***.lua file in the `.storage/midea_auto_cloud/lua/` directory and `zip` file in the `.storage/midea_auto_cloud/plugin/` directory, and wait for adaptation.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
- T0xB7 燃气灶
|
- T0xB7 燃气灶
|
||||||
- T0xB8 智能扫地机器人
|
- T0xB8 智能扫地机器人
|
||||||
- T0xBF 微波炉
|
- T0xBF 微波炉
|
||||||
|
- T0xC3 热泵
|
||||||
- T0xCA 对开门冰箱
|
- T0xCA 对开门冰箱
|
||||||
- T0xCC 中央空调(风管机)Wi-Fi线控器
|
- T0xCC 中央空调(风管机)Wi-Fi线控器
|
||||||
- T0xCD 空气能热水器
|
- T0xCD 空气能热水器
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
- T0xE1 洗碗机
|
- T0xE1 洗碗机
|
||||||
- T0xE2 电热水器
|
- T0xE2 电热水器
|
||||||
- T0xE3 恒温式燃气热水器
|
- T0xE3 恒温式燃气热水器
|
||||||
|
- T0xE6 壁挂炉
|
||||||
- T0xEA 电饭锅
|
- T0xEA 电饭锅
|
||||||
- T0xED 软水机
|
- T0xED 软水机
|
||||||
- T0xFA 电风扇
|
- T0xFA 电风扇
|
||||||
@@ -60,7 +62,7 @@
|
|||||||
|
|
||||||
展开下面的`属性`卡片,把里面这些字段随issue提交。 着重关注Device type、Subtype这两个字段,这是后续获得设备控制对应lua文件的基础。
|
展开下面的`属性`卡片,把里面这些字段随issue提交。 着重关注Device type、Subtype这两个字段,这是后续获得设备控制对应lua文件的基础。
|
||||||
|
|
||||||
再进入Homeassistant的安装目录, 在`.storage/midea_auto_cloud/lua/`目录下找到设备对应的T_0000_`Device type`_`Subtype`_***.lua文件,等待适配就可以了。
|
再进入Homeassistant的安装目录, 在`.storage/midea_auto_cloud/lua/`目录下找到设备对应的T_0000_`Device type`_`Subtype`_***.lua文件,以及`.storage/midea_auto_cloud/plugin/`目录下的`zip`文件,等待适配就可以了。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
import base64
|
import base64
|
||||||
|
import traceback
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
import re
|
import re
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
@@ -44,7 +45,7 @@ from .const import (
|
|||||||
CONF_SN,
|
CONF_SN,
|
||||||
CONF_MODEL_NUMBER,
|
CONF_MODEL_NUMBER,
|
||||||
CONF_SERVERS, STORAGE_PATH, CONF_MANUFACTURER_CODE,
|
CONF_SERVERS, STORAGE_PATH, CONF_MANUFACTURER_CODE,
|
||||||
CONF_SELECTED_HOMES
|
CONF_SELECTED_HOMES, CONF_SMART_PRODUCT_ID, STORAGE_PLUGIN_PATH
|
||||||
)
|
)
|
||||||
# 账号型:登录云端、获取设备列表,并为每台设备建立协调器(无本地控制)
|
# 账号型:登录云端、获取设备列表,并为每台设备建立协调器(无本地控制)
|
||||||
from .const import CONF_PASSWORD as CONF_PASSWORD_KEY, CONF_SERVER as CONF_SERVER_KEY
|
from .const import CONF_PASSWORD as CONF_PASSWORD_KEY, CONF_SERVER as CONF_SERVER_KEY
|
||||||
@@ -249,6 +250,22 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):
|
|||||||
model_number=info.get(CONF_MODEL_NUMBER),
|
model_number=info.get(CONF_MODEL_NUMBER),
|
||||||
manufacturer_code=info.get(CONF_MANUFACTURER_CODE),
|
manufacturer_code=info.get(CONF_MANUFACTURER_CODE),
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
|
os.makedirs(hass.config.path(STORAGE_PLUGIN_PATH), exist_ok=True)
|
||||||
|
plugin_path = hass.config.path(STORAGE_PLUGIN_PATH)
|
||||||
|
await cloud.download_plugin(
|
||||||
|
path=plugin_path,
|
||||||
|
appliance_code=appliance_code,
|
||||||
|
smart_product_id=info.get(CONF_SMART_PRODUCT_ID),
|
||||||
|
device_type=info.get(CONF_TYPE),
|
||||||
|
sn=info.get(CONF_SN),
|
||||||
|
sn8=info.get(CONF_SN8),
|
||||||
|
model_number=info.get(CONF_MODEL_NUMBER),
|
||||||
|
manufacturer_code=info.get(CONF_MANUFACTURER_CODE),
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
device = MiedaDevice(
|
device = MiedaDevice(
|
||||||
name=info.get(CONF_NAME),
|
name=info.get(CONF_NAME),
|
||||||
|
|||||||
@@ -108,13 +108,23 @@ class MideaClimateEntity(MideaEntity, ClimateEntity):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def current_temperature(self):
|
def current_temperature(self):
|
||||||
temp = self._get_nested_value(self._key_current_temperature)
|
if isinstance(self._key_current_temperature, list):
|
||||||
if temp is not None:
|
temp_int = self._get_nested_value(self._key_current_temperature[0])
|
||||||
try:
|
tem_dec = self._get_nested_value(self._key_current_temperature[1])
|
||||||
return float(temp)
|
if temp_int is not None and tem_dec is not None:
|
||||||
except (ValueError, TypeError):
|
try:
|
||||||
return None
|
return float(temp_int) + float(tem_dec)
|
||||||
return None
|
except (ValueError, TypeError):
|
||||||
|
return None
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
temp = self._get_nested_value(self._key_current_temperature)
|
||||||
|
if temp is not None:
|
||||||
|
try:
|
||||||
|
return float(temp)
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
return None
|
||||||
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def target_temperature(self):
|
def target_temperature(self):
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,8 @@ import time
|
|||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
import base64
|
import base64
|
||||||
import asyncio
|
import traceback
|
||||||
|
import os
|
||||||
import aiofiles
|
import aiofiles
|
||||||
import requests
|
import requests
|
||||||
from aiohttp import ClientSession
|
from aiohttp import ClientSession
|
||||||
@@ -28,7 +29,6 @@ clouds = {
|
|||||||
"app_key": "ac21b9f9cbfe4ca5a88562ef25e2b768",
|
"app_key": "ac21b9f9cbfe4ca5a88562ef25e2b768",
|
||||||
"iot_key": bytes.fromhex(format(7882822598523843940, 'x')).decode(),
|
"iot_key": bytes.fromhex(format(7882822598523843940, 'x')).decode(),
|
||||||
"hmac_key": bytes.fromhex(format(117390035944627627450677220413733956185864939010425, 'x')).decode(),
|
"hmac_key": bytes.fromhex(format(117390035944627627450677220413733956185864939010425, 'x')).decode(),
|
||||||
# "api_url": "https://mp-eu-prod.appsmb.com/mas/v5/app/proxy?alias=",
|
|
||||||
"api_url": "https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=",
|
"api_url": "https://mp-prod.appsmb.com/mas/v5/app/proxy?alias=",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,8 @@ class MideaCloud:
|
|||||||
app_key: str,
|
app_key: str,
|
||||||
account: str,
|
account: str,
|
||||||
password: str,
|
password: str,
|
||||||
api_url: str
|
api_url: str,
|
||||||
|
proxy: str | None = None
|
||||||
):
|
):
|
||||||
self._device_id = CloudSecurity.get_deviceid(account)
|
self._device_id = CloudSecurity.get_deviceid(account)
|
||||||
self._session = session
|
self._session = session
|
||||||
@@ -59,6 +60,7 @@ class MideaCloud:
|
|||||||
self._account = account
|
self._account = account
|
||||||
self._password = password
|
self._password = password
|
||||||
self._api_url = api_url
|
self._api_url = api_url
|
||||||
|
self._proxy = proxy
|
||||||
self._access_token = None
|
self._access_token = None
|
||||||
self._login_id = None
|
self._login_id = None
|
||||||
|
|
||||||
@@ -90,13 +92,21 @@ class MideaCloud:
|
|||||||
"accesstoken": self._access_token
|
"accesstoken": self._access_token
|
||||||
})
|
})
|
||||||
response:dict = {"code": -1}
|
response:dict = {"code": -1}
|
||||||
|
_LOGGER.debug(f"Midea cloud API url: {url}, header: {header}, data: {data}")
|
||||||
try:
|
try:
|
||||||
r = await self._session.request(method, url, headers=header, data=dump_data, timeout=5)
|
r = await self._session.request(
|
||||||
|
method,
|
||||||
|
url,
|
||||||
|
headers=header,
|
||||||
|
data=dump_data,
|
||||||
|
timeout=30,
|
||||||
|
proxy=self._proxy
|
||||||
|
)
|
||||||
raw = await r.read()
|
raw = await r.read()
|
||||||
_LOGGER.debug(f"Midea cloud API url: {url}, header: {header}, data: {data}, response: {raw}")
|
_LOGGER.debug(f"Midea cloud API url: {url}, header: {header}, data: {data}, response: {raw}")
|
||||||
response = json.loads(raw)
|
response = json.loads(raw)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
_LOGGER.debug(f"API request attempt failed: {e}")
|
traceback.print_exc()
|
||||||
|
|
||||||
if int(response["code"]) == 0:
|
if int(response["code"]) == 0:
|
||||||
if "data" in response:
|
if "data" in response:
|
||||||
@@ -139,7 +149,7 @@ class MideaCloud:
|
|||||||
_LOGGER.debug(f"Midea cloud API url: {url}, data: {data}, response: {raw}")
|
_LOGGER.debug(f"Midea cloud API url: {url}, data: {data}, response: {raw}")
|
||||||
response = json.loads(raw)
|
response = json.loads(raw)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
_LOGGER.debug(f"API request attempt failed: {e}")
|
traceback.print_exc()
|
||||||
|
|
||||||
if int(response["code"]) == 0 and "data" in response:
|
if int(response["code"]) == 0 and "data" in response:
|
||||||
return response["data"]
|
return response["data"]
|
||||||
@@ -149,7 +159,8 @@ class MideaCloud:
|
|||||||
async def _get_login_id(self) -> str | None:
|
async def _get_login_id(self) -> str | None:
|
||||||
data = self._make_general_data()
|
data = self._make_general_data()
|
||||||
data.update({
|
data.update({
|
||||||
"loginAccount": f"{self._account}"
|
"loginAccount": f"{self._account}",
|
||||||
|
"type": "1",
|
||||||
})
|
})
|
||||||
if response := await self._api_request(
|
if response := await self._api_request(
|
||||||
endpoint="/v1/user/login/id/get",
|
endpoint="/v1/user/login/id/get",
|
||||||
@@ -175,7 +186,19 @@ class MideaCloud:
|
|||||||
manufacturer_code: str = "0000",
|
manufacturer_code: str = "0000",
|
||||||
):
|
):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
|
async def download_plugin(
|
||||||
|
self, path: str,
|
||||||
|
appliance_code: str,
|
||||||
|
smart_product_id: str,
|
||||||
|
device_type: int,
|
||||||
|
sn: str,
|
||||||
|
sn8: str,
|
||||||
|
model_number: str | None,
|
||||||
|
manufacturer_code: str = "0000",
|
||||||
|
):
|
||||||
|
raise NotImplementedError()
|
||||||
|
|
||||||
async def send_central_ac_control(self, appliance_code: int, nodeid: str, modelid: str, idtype: int, control: dict) -> bool:
|
async def send_central_ac_control(self, appliance_code: int, nodeid: str, modelid: str, idtype: int, control: dict) -> bool:
|
||||||
"""Send control to central AC subdevice. Subclasses should implement if supported."""
|
"""Send control to central AC subdevice. Subclasses should implement if supported."""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
@@ -199,6 +222,7 @@ class MeijuCloud(MideaCloud):
|
|||||||
session: ClientSession,
|
session: ClientSession,
|
||||||
account: str,
|
account: str,
|
||||||
password: str,
|
password: str,
|
||||||
|
proxy: str | None = None,
|
||||||
):
|
):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
session=session,
|
session=session,
|
||||||
@@ -210,7 +234,8 @@ class MeijuCloud(MideaCloud):
|
|||||||
app_key=clouds[cloud_name]["app_key"],
|
app_key=clouds[cloud_name]["app_key"],
|
||||||
account=account,
|
account=account,
|
||||||
password=password,
|
password=password,
|
||||||
api_url=clouds[cloud_name]["api_url"]
|
api_url=clouds[cloud_name]["api_url"],
|
||||||
|
proxy=proxy
|
||||||
)
|
)
|
||||||
self._homegroup_id = None
|
self._homegroup_id = None
|
||||||
|
|
||||||
@@ -283,6 +308,7 @@ class MeijuCloud(MideaCloud):
|
|||||||
"type": int(appliance.get("type"), 16),
|
"type": int(appliance.get("type"), 16),
|
||||||
"sn": self._security.aes_decrypt(appliance.get("sn")) if appliance.get("sn") else "",
|
"sn": self._security.aes_decrypt(appliance.get("sn")) if appliance.get("sn") else "",
|
||||||
"sn8": appliance.get("sn8", "00000000"),
|
"sn8": appliance.get("sn8", "00000000"),
|
||||||
|
"smart_product_id": appliance.get("smartProductId", "0"),
|
||||||
"model_number": appliance.get("modelNumber", "0"),
|
"model_number": appliance.get("modelNumber", "0"),
|
||||||
"manufacturer_code": appliance.get("enterpriseCode", "0000"),
|
"manufacturer_code": appliance.get("enterpriseCode", "0000"),
|
||||||
"model": appliance.get("productModel"),
|
"model": appliance.get("productModel"),
|
||||||
@@ -471,6 +497,93 @@ class MeijuCloud(MideaCloud):
|
|||||||
return fnm
|
return fnm
|
||||||
|
|
||||||
|
|
||||||
|
async def download_plugin(
|
||||||
|
self, path: str,
|
||||||
|
appliance_code: str,
|
||||||
|
smart_product_id: str,
|
||||||
|
device_type: int,
|
||||||
|
sn: str,
|
||||||
|
sn8: str,
|
||||||
|
model_number: str | None,
|
||||||
|
manufacturer_code: str = "0000",
|
||||||
|
):
|
||||||
|
# 构建 applianceList,根据传入的参数动态生成
|
||||||
|
appliance_info = {
|
||||||
|
"appModel": sn8,
|
||||||
|
"appEnterprise": manufacturer_code,
|
||||||
|
"appType": f"0x{device_type:02X}",
|
||||||
|
"applianceCode": str(appliance_code) if isinstance(appliance_code, int) else appliance_code,
|
||||||
|
"smartProductId": str(smart_product_id) if isinstance(smart_product_id, int) else smart_product_id,
|
||||||
|
"modelNumber": model_number or "0",
|
||||||
|
"versionCode": 0
|
||||||
|
}
|
||||||
|
appliance_list = [appliance_info]
|
||||||
|
data = {
|
||||||
|
"applianceList": json.dumps(appliance_list),
|
||||||
|
"iotAppId": self.APP_ID,
|
||||||
|
"match": "1",
|
||||||
|
"clientType": "1",
|
||||||
|
"clientVersion": 201
|
||||||
|
}
|
||||||
|
fnm = None
|
||||||
|
if response := await self._api_request(
|
||||||
|
endpoint="/v1/plugin/update/getPluginV3",
|
||||||
|
data=data
|
||||||
|
):
|
||||||
|
# response 是 {"list": [...]}
|
||||||
|
plugin_list = response.get("list", [])
|
||||||
|
if not plugin_list:
|
||||||
|
MideaLogger.warning(f"No plugin found for device type 0x{device_type:02X}, sn: {sn}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
# 找到匹配的设备(优先匹配 applianceCode,其次匹配 appType)
|
||||||
|
matched_plugin = None
|
||||||
|
# 首先尝试精确匹配 applianceCode
|
||||||
|
for plugin in plugin_list:
|
||||||
|
if plugin.get("applianceCode") == sn and plugin.get("appType") == f"0x{device_type:02X}":
|
||||||
|
matched_plugin = plugin
|
||||||
|
break
|
||||||
|
|
||||||
|
# 如果没有精确匹配,使用第一个匹配 appType 的
|
||||||
|
if not matched_plugin:
|
||||||
|
for plugin in plugin_list:
|
||||||
|
if plugin.get("appType") == f"0x{device_type:02X}":
|
||||||
|
matched_plugin = plugin
|
||||||
|
break
|
||||||
|
|
||||||
|
if not matched_plugin:
|
||||||
|
MideaLogger.warning(f"No matching plugin found for device type 0x{device_type:02X}, sn: {sn}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
# 下载 zip 文件
|
||||||
|
zip_url = matched_plugin.get("url")
|
||||||
|
zip_title = matched_plugin.get("title", f"plugin_0x{device_type:02X}.zip")
|
||||||
|
|
||||||
|
if not zip_url:
|
||||||
|
MideaLogger.warning(f"No download URL found for plugin: {zip_title}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
try:
|
||||||
|
# 确保目录存在
|
||||||
|
os.makedirs(path, exist_ok=True)
|
||||||
|
|
||||||
|
res = await self._session.get(zip_url)
|
||||||
|
if res.status == 200:
|
||||||
|
zip_data = await res.read()
|
||||||
|
if zip_data:
|
||||||
|
fnm = f"{path}/{zip_title}"
|
||||||
|
async with aiofiles.open(fnm, "wb") as fp:
|
||||||
|
await fp.write(zip_data)
|
||||||
|
MideaLogger.info(f"Downloaded plugin file: {fnm}")
|
||||||
|
else:
|
||||||
|
MideaLogger.warning(f"Downloaded zip file is empty: {zip_url}")
|
||||||
|
else:
|
||||||
|
MideaLogger.warning(f"Failed to download plugin, status: {res.status}, url: {zip_url}")
|
||||||
|
except Exception as e:
|
||||||
|
MideaLogger.error(f"Error downloading plugin: {e}")
|
||||||
|
traceback.print_exc()
|
||||||
|
return fnm
|
||||||
|
|
||||||
class MSmartHomeCloud(MideaCloud):
|
class MSmartHomeCloud(MideaCloud):
|
||||||
APP_ID = "1010"
|
APP_ID = "1010"
|
||||||
SRC = "10"
|
SRC = "10"
|
||||||
@@ -482,6 +595,7 @@ class MSmartHomeCloud(MideaCloud):
|
|||||||
session: ClientSession,
|
session: ClientSession,
|
||||||
account: str,
|
account: str,
|
||||||
password: str,
|
password: str,
|
||||||
|
proxy: str | None = None,
|
||||||
):
|
):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
session=session,
|
session=session,
|
||||||
@@ -493,7 +607,8 @@ class MSmartHomeCloud(MideaCloud):
|
|||||||
app_key=clouds[cloud_name]["app_key"],
|
app_key=clouds[cloud_name]["app_key"],
|
||||||
account=account,
|
account=account,
|
||||||
password=password,
|
password=password,
|
||||||
api_url=clouds[cloud_name]["api_url"]
|
api_url=clouds[cloud_name]["api_url"],
|
||||||
|
proxy=proxy
|
||||||
)
|
)
|
||||||
self._auth_base = base64.b64encode(
|
self._auth_base = base64.b64encode(
|
||||||
f"{self._app_key}:{clouds['MSmartHome']['iot_key']}".encode("ascii")
|
f"{self._app_key}:{clouds['MSmartHome']['iot_key']}".encode("ascii")
|
||||||
@@ -529,11 +644,12 @@ class MSmartHomeCloud(MideaCloud):
|
|||||||
async def _re_route(self):
|
async def _re_route(self):
|
||||||
data = self._make_general_data()
|
data = self._make_general_data()
|
||||||
data.update({
|
data.update({
|
||||||
"userType": "0",
|
"userName": f"{self._account}",
|
||||||
"userName": f"{self._account}"
|
"platformId": "1",
|
||||||
|
"userType": "0"
|
||||||
})
|
})
|
||||||
if response := await self._api_request(
|
if response := await self._api_request(
|
||||||
endpoint="/v1/multicloud/platform/user/route",
|
endpoint="/v1/unitcenter/router/user/name",
|
||||||
data=data
|
data=data
|
||||||
):
|
):
|
||||||
if api_url := response.get("masUrl"):
|
if api_url := response.get("masUrl"):
|
||||||
@@ -728,13 +844,14 @@ class MSmartHomeCloud(MideaCloud):
|
|||||||
return response is not None
|
return response is not None
|
||||||
|
|
||||||
|
|
||||||
def get_midea_cloud(cloud_name: str, session: ClientSession, account: str, password: str) -> MideaCloud | None:
|
def get_midea_cloud(cloud_name: str, session: ClientSession, account: str, password: str, proxy: str | None = None) -> MideaCloud | None:
|
||||||
cloud = None
|
cloud = None
|
||||||
if cloud_name in clouds.keys():
|
if cloud_name in clouds.keys():
|
||||||
cloud = globals()[clouds[cloud_name]["class_name"]](
|
cloud = globals()[clouds[cloud_name]["class_name"]](
|
||||||
cloud_name=cloud_name,
|
cloud_name=cloud_name,
|
||||||
session=session,
|
session=session,
|
||||||
account=account,
|
account=account,
|
||||||
password=password
|
password=password,
|
||||||
|
proxy=proxy
|
||||||
)
|
)
|
||||||
return cloud
|
return cloud
|
||||||
|
|||||||
@@ -341,11 +341,11 @@ class MiedaDevice(threading.Thread):
|
|||||||
if calculate:
|
if calculate:
|
||||||
calculate_str1 = \
|
calculate_str1 = \
|
||||||
(f"{lvalue.replace('[', 'self._attributes[').replace("]", "\"]")} = "
|
(f"{lvalue.replace('[', 'self._attributes[').replace("]", "\"]")} = "
|
||||||
f"{rvalue.replace('[', 'float(self._attributes[').replace(']', "\"])")}") \
|
f"{rvalue.replace('[', 'self._attributes[').replace(']', "\"]")}") \
|
||||||
.replace("[", "[\"")
|
.replace("[", "[\"")
|
||||||
calculate_str2 = \
|
calculate_str2 = \
|
||||||
(f"{lvalue.replace('[', 'new_status[').replace("]", "\"]")} = "
|
(f"{lvalue.replace('[', 'new_status[').replace("]", "\"]")} = "
|
||||||
f"{rvalue.replace('[', 'float(self._attributes[').replace(']', "\"])")}") \
|
f"{rvalue.replace('[', 'self._attributes[').replace(']', "\"]")}") \
|
||||||
.replace("[", "[\"")
|
.replace("[", "[\"")
|
||||||
try:
|
try:
|
||||||
exec(calculate_str1)
|
exec(calculate_str1)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ class MideaLogType(IntEnum):
|
|||||||
DEBUG = 1
|
DEBUG = 1
|
||||||
WARN = 2
|
WARN = 2
|
||||||
ERROR = 3
|
ERROR = 3
|
||||||
|
INFO = 4
|
||||||
|
|
||||||
|
|
||||||
class MideaLogger:
|
class MideaLogger:
|
||||||
@@ -18,6 +19,8 @@ class MideaLogger:
|
|||||||
log = f"[{device_id}] {log}"
|
log = f"[{device_id}] {log}"
|
||||||
if log_type == MideaLogType.DEBUG:
|
if log_type == MideaLogType.DEBUG:
|
||||||
logging.getLogger(mod.__name__).debug(log)
|
logging.getLogger(mod.__name__).debug(log)
|
||||||
|
elif log_type == MideaLogType.INFO:
|
||||||
|
logging.getLogger(mod.__name__).info(log)
|
||||||
elif log_type == MideaLogType.WARN:
|
elif log_type == MideaLogType.WARN:
|
||||||
logging.getLogger(mod.__name__).warning(log)
|
logging.getLogger(mod.__name__).warning(log)
|
||||||
elif log_type == MideaLogType.ERROR:
|
elif log_type == MideaLogType.ERROR:
|
||||||
@@ -27,6 +30,10 @@ class MideaLogger:
|
|||||||
def debug(log, device_id=None):
|
def debug(log, device_id=None):
|
||||||
MideaLogger._log(MideaLogType.DEBUG, log, device_id)
|
MideaLogger._log(MideaLogType.DEBUG, log, device_id)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def info(log, device_id=None):
|
||||||
|
MideaLogger._log(MideaLogType.INFO, log, device_id)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def warning(log, device_id=None):
|
def warning(log, device_id=None):
|
||||||
MideaLogger._log(MideaLogType.WARN, log, device_id)
|
MideaLogger._log(MideaLogType.WARN, log, device_id)
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ class MideaDataUpdateCoordinator(DataUpdateCoordinator[MideaDeviceData]):
|
|||||||
if calculate:
|
if calculate:
|
||||||
calculate_str1 = \
|
calculate_str1 = \
|
||||||
(f"{lvalue.replace('[', 'attributes[').replace("]", "\"]")} = "
|
(f"{lvalue.replace('[', 'attributes[').replace("]", "\"]")} = "
|
||||||
f"{rvalue.replace('[', 'float(attributes[').replace(']', "\"])")}") \
|
f"{rvalue.replace('[', 'attributes[').replace(']', "\"]")}") \
|
||||||
.replace("[", "[\"")
|
.replace("[", "[\"")
|
||||||
try:
|
try:
|
||||||
exec(calculate_str1)
|
exec(calculate_str1)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from homeassistant.const import Platform
|
from homeassistant.components.fan import DIRECTION_FORWARD, DIRECTION_REVERSE
|
||||||
|
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_WHOLE
|
||||||
|
|
||||||
DEVICE_MAPPING = {
|
DEVICE_MAPPING = {
|
||||||
"default": {
|
"default": {
|
||||||
@@ -57,5 +58,73 @@ DEVICE_MAPPING = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"79010863": {
|
||||||
|
"rationale": ["off", "on"],
|
||||||
|
"queries": [{}],
|
||||||
|
"centralized": [],
|
||||||
|
"calculate": {
|
||||||
|
"get": [
|
||||||
|
{
|
||||||
|
"lvalue": "[device_fan_speed]",
|
||||||
|
"rvalue": "int((int([fan_speed])) / 20) + 1"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"set": [
|
||||||
|
{
|
||||||
|
"lvalue": "[fan_speed]",
|
||||||
|
"rvalue": "min(int((int([device_fan_speed]) - 1) * 20 + 1), 100)"
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"entities": {
|
||||||
|
Platform.LIGHT: {
|
||||||
|
"light": {
|
||||||
|
"power": "led_power",
|
||||||
|
"brightness": {"brightness": [1, 100]},
|
||||||
|
"color_temp": {"color_temperature": [2700, 6500]},
|
||||||
|
"preset_modes": {
|
||||||
|
"work": {"led_scene_light": "work"},
|
||||||
|
"eating": {"led_scene_light": "eating"},
|
||||||
|
"film": {"led_scene_light": "film"},
|
||||||
|
"night": {"led_scene_light": "night"},
|
||||||
|
"ledmanual": {"led_scene_light": "ledmanual"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.FAN: {
|
||||||
|
"fan": {
|
||||||
|
"power": "fan_power",
|
||||||
|
"speeds": list({"device_fan_speed": value + 1} for value in range(0, 6)),
|
||||||
|
"preset_modes": {
|
||||||
|
"breathing_wind": {"fan_scene": "breathing_wind"},
|
||||||
|
"const_temperature": {"fan_scene": "const_temperature"},
|
||||||
|
"fanmanual": {"fan_scene": "fanmanual"},
|
||||||
|
"baby_wind": {"fan_scene": "baby_wind"},
|
||||||
|
"sleep_wind": {"fan_scene": "sleep_wind"},
|
||||||
|
"forest_wind": {"fan_scene": "forest_wind"}
|
||||||
|
},
|
||||||
|
"directions": {
|
||||||
|
DIRECTION_FORWARD: {"arround_dir": "1"},
|
||||||
|
DIRECTION_REVERSE: {"arround_dir": "0"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.CLIMATE: {
|
||||||
|
"thermostat": {
|
||||||
|
"power": "fan_power",
|
||||||
|
"hvac_modes": {
|
||||||
|
"off": {"fan_scene": "fanmanual"},
|
||||||
|
"auto": {"fan_scene": "const_temperature"},
|
||||||
|
},
|
||||||
|
"target_temperature": "const_temperature_value",
|
||||||
|
"current_temperature": "indoor_temperature",
|
||||||
|
"min_temp": 20,
|
||||||
|
"max_temp": 35,
|
||||||
|
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||||
|
"precision": PRECISION_WHOLE,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ DEVICE_MAPPING = {
|
|||||||
"default": {
|
"default": {
|
||||||
"rationale": ["off", "on"],
|
"rationale": ["off", "on"],
|
||||||
"queries": [{}],
|
"queries": [{}],
|
||||||
"centralized": ["b6_light"],
|
"centralized": [],
|
||||||
"entities": {
|
"entities": {
|
||||||
Platform.NUMBER: {
|
Platform.NUMBER: {
|
||||||
"b6_lightness": {
|
"b6_lightness": {
|
||||||
@@ -18,11 +18,26 @@ DEVICE_MAPPING = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Platform.SWITCH: {
|
Platform.SWITCH: {
|
||||||
|
"total_power": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"translation_key": "power"
|
||||||
|
},
|
||||||
|
"total_lock": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"translation_key": "lock"
|
||||||
|
},
|
||||||
"b6_light": {
|
"b6_light": {
|
||||||
"device_class": SwitchDeviceClass.SWITCH,
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Platform.SELECT: {
|
Platform.SELECT: {
|
||||||
|
"b3_function_control":{
|
||||||
|
"options": {
|
||||||
|
"关闭": {"b3_work_cabinet_control": 1, "b3_function_control": 1},
|
||||||
|
"消毒": {"b3_work_cabinet_control": 1, "b3_function_control": 2, "b3_work_destination_time": 60},
|
||||||
|
"烘干": {"b3_work_cabinet_control": 1, "b3_function_control": 4, "b3_work_destination_time": 120},
|
||||||
|
}
|
||||||
|
},
|
||||||
"b6_gear": {
|
"b6_gear": {
|
||||||
"options": {
|
"options": {
|
||||||
"关": {"b6_gear": "0"},
|
"关": {"b6_gear": "0"},
|
||||||
@@ -75,10 +90,25 @@ DEVICE_MAPPING = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Platform.SENSOR: {
|
Platform.SENSOR: {
|
||||||
|
"b3_upstair_status": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
"b6_wind_pressure": {
|
"b6_wind_pressure": {
|
||||||
"device_class": SensorDeviceClass.PRESSURE,
|
"device_class": SensorDeviceClass.PRESSURE,
|
||||||
"unit_of_measurement": UnitOfPressure.PA,
|
"unit_of_measurement": UnitOfPressure.PA,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"b7_left_status": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"b7_left_gear": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"b7_right_status": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"b7_right_gear": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, PRECISION_WHOLE
|
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, PRECISION_WHOLE, \
|
||||||
|
CONCENTRATION_PARTS_PER_MILLION, CONCENTRATION_MICROGRAMS_PER_CUBIC_METER
|
||||||
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||||
# from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
# from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||||
from homeassistant.components.switch import SwitchDeviceClass
|
from homeassistant.components.switch import SwitchDeviceClass
|
||||||
@@ -6,7 +7,7 @@ from homeassistant.components.switch import SwitchDeviceClass
|
|||||||
DEVICE_MAPPING = {
|
DEVICE_MAPPING = {
|
||||||
"default": {
|
"default": {
|
||||||
"rationale": ["off", "on"],
|
"rationale": ["off", "on"],
|
||||||
"queries": [{}, {"query_type":"run_status"}],
|
"queries": [{}, {"query_type":"run_status"}, {"query_type":"indoor_humidity"}, {"query_type":"indoor_temperature"}],
|
||||||
"centralized": [],
|
"centralized": [],
|
||||||
"entities": {
|
"entities": {
|
||||||
Platform.FAN: {
|
Platform.FAN: {
|
||||||
@@ -108,7 +109,233 @@ DEVICE_MAPPING = {
|
|||||||
"aux_heat": {
|
"aux_heat": {
|
||||||
"device_class": SwitchDeviceClass.SWITCH,
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
Platform.SELECT: {
|
||||||
"follow_body_sense": {
|
"follow_body_sense": {
|
||||||
|
"options": {
|
||||||
|
"on": {"follow_body_sense": "on", "follow_body_sense_enable": 1},
|
||||||
|
"off": {"follow_body_sense": "off", "follow_body_sense_enable": 1},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.SENSOR: {
|
||||||
|
"mode": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"indoor_temperature": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"indoor_humidity": {
|
||||||
|
"device_class": SensorDeviceClass.HUMIDITY,
|
||||||
|
"unit_of_measurement": "%",
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"22259015": {
|
||||||
|
"rationale": ["off", "on"],
|
||||||
|
"queries": [{}, {"query_type": "run_status"}, {"query_type": "module_30"}, {"query_type": "module_31"},
|
||||||
|
{"query_type": "module_32"}],
|
||||||
|
"centralized": [],
|
||||||
|
"calculate": {
|
||||||
|
"get": [
|
||||||
|
{
|
||||||
|
"lvalue": "[indoor_humidity]",
|
||||||
|
"rvalue": "[humidity_value]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lvalue": "[indoor_temperature]",
|
||||||
|
"rvalue": "[t1_temp]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lvalue": "[co2_value]",
|
||||||
|
"rvalue": "[co2_concentration]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lvalue": "[pm25_value]",
|
||||||
|
"rvalue": "[dust_co2]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"set": []
|
||||||
|
},
|
||||||
|
"entities": {
|
||||||
|
Platform.CLIMATE: {
|
||||||
|
"thermostat": {
|
||||||
|
"power": "power",
|
||||||
|
"hvac_modes": {
|
||||||
|
"off": {"power": "off"},
|
||||||
|
"heat": {"power": "on", "mode": "heat"},
|
||||||
|
"cool": {"power": "on", "mode": "cool"},
|
||||||
|
"auto": {"power": "on", "mode": "auto"},
|
||||||
|
"dry": {"power": "on", "mode": "dry"},
|
||||||
|
"fan_only": {"power": "on", "mode": "fan"}
|
||||||
|
},
|
||||||
|
"preset_modes": {
|
||||||
|
"none": {
|
||||||
|
"eco": "off",
|
||||||
|
"comfort_power_save": "off",
|
||||||
|
"cool_power_saving": 0,
|
||||||
|
"strong_wind": "off"
|
||||||
|
},
|
||||||
|
"eco": {"eco": "on", "cool_power_saving": 1},
|
||||||
|
"comfort": {"comfort_power_save": "on"},
|
||||||
|
"boost": {"strong_wind": "on"}
|
||||||
|
},
|
||||||
|
"swing_modes": {
|
||||||
|
"off": {"wind_swing_lr": "off", "wind_swing_ud": "off"},
|
||||||
|
"both": {"wind_swing_lr": "on", "wind_swing_ud": "on"},
|
||||||
|
"horizontal": {"wind_swing_lr": "on", "wind_swing_ud": "off"},
|
||||||
|
"vertical": {"wind_swing_lr": "off", "wind_swing_ud": "on"},
|
||||||
|
},
|
||||||
|
"fan_modes": {
|
||||||
|
"silent": {"wind_speed": 20},
|
||||||
|
"low": {"wind_speed": 40},
|
||||||
|
"medium": {"wind_speed": 60},
|
||||||
|
"high": {"wind_speed": 80},
|
||||||
|
"full": {"wind_speed": 100},
|
||||||
|
"auto": {"wind_speed": 102}
|
||||||
|
},
|
||||||
|
"target_temperature": ["temperature", "small_temperature"],
|
||||||
|
"current_temperature": "indoor_temperature",
|
||||||
|
"pre_mode": "mode",
|
||||||
|
"aux_heat": "ptc",
|
||||||
|
"min_temp": 17,
|
||||||
|
"max_temp": 30,
|
||||||
|
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||||
|
"precision": PRECISION_HALVES,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.SWITCH: {
|
||||||
|
"dry": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"prevent_straight_wind": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"rationale": [0, 1]
|
||||||
|
},
|
||||||
|
"aux_heat": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"manul_fresh_air": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"auto_comfort_fresh_air": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"auto_fresh_off_co2": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"comfort_fresh_air": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.SENSOR: {
|
||||||
|
"mode": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"indoor_temperature": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"indoor_humidity": {
|
||||||
|
"device_class": SensorDeviceClass.HUMIDITY,
|
||||||
|
"unit_of_measurement": "%",
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"co2_value": {
|
||||||
|
"device_class": SensorDeviceClass.CO2,
|
||||||
|
"unit_of_measurement": CONCENTRATION_PARTS_PER_MILLION,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT,
|
||||||
|
},
|
||||||
|
"pm25_value": {
|
||||||
|
"device_class": SensorDeviceClass.PM25,
|
||||||
|
"unit_of_measurement": CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
("22019031", "22019035", "22019045"): {
|
||||||
|
"rationale": ["off", "on"],
|
||||||
|
"queries": [{}, {"query_type":"fresh_air"}, {"query_type":"indoor_humidity"}, {"query_type":"indoor_temperature"}, {"query_type":"outdoor_temperature"}],
|
||||||
|
"centralized": [],
|
||||||
|
"entities": {
|
||||||
|
Platform.FAN: {
|
||||||
|
"fan": {
|
||||||
|
"power": "fresh_air",
|
||||||
|
"speeds": [
|
||||||
|
{"fresh_air": "on", "fresh_air_fan_speed": 40},
|
||||||
|
{"fresh_air": "on", "fresh_air_fan_speed": 60},
|
||||||
|
{"fresh_air": "on", "fresh_air_fan_speed": 80},
|
||||||
|
{"fresh_air": "on", "fresh_air_fan_speed": 100}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.CLIMATE: {
|
||||||
|
"thermostat": {
|
||||||
|
"power": "power",
|
||||||
|
"hvac_modes": {
|
||||||
|
"off": {"power": "off"},
|
||||||
|
"heat": {"power": "on", "mode": "heat"},
|
||||||
|
"cool": {"power": "on", "mode": "cool"},
|
||||||
|
"auto": {"power": "on", "mode": "auto"},
|
||||||
|
"dry": {"power": "on", "mode": "dry"},
|
||||||
|
"fan_only": {"power": "on", "mode": "fan"}
|
||||||
|
},
|
||||||
|
"preset_modes": {
|
||||||
|
"none": {
|
||||||
|
"eco": "off",
|
||||||
|
"comfort_power_save": "off",
|
||||||
|
"cool_power_saving": 0,
|
||||||
|
# "comfort_sleep": "off",
|
||||||
|
"strong_wind": "off"
|
||||||
|
},
|
||||||
|
"eco": {"eco": "on", "cool_power_saving": 1},
|
||||||
|
"comfort": {"comfort_power_save": "on"},
|
||||||
|
# "sleep": {"comfort_sleep": "on"},
|
||||||
|
"boost": {"strong_wind": "on"}
|
||||||
|
},
|
||||||
|
"swing_modes": {
|
||||||
|
"off": {"wind_swing_lr": "off", "wind_swing_ud": "off"},
|
||||||
|
"both": {"wind_swing_lr": "on", "wind_swing_ud": "on"},
|
||||||
|
"horizontal": {"wind_swing_lr": "on", "wind_swing_ud": "off"},
|
||||||
|
"vertical": {"wind_swing_lr": "off", "wind_swing_ud": "on"},
|
||||||
|
},
|
||||||
|
"fan_modes": {
|
||||||
|
"silent": {"wind_speed": 20},
|
||||||
|
"low": {"wind_speed": 40},
|
||||||
|
"medium": {"wind_speed": 60},
|
||||||
|
"high": {"wind_speed": 80},
|
||||||
|
"full": {"wind_speed": 100},
|
||||||
|
"auto": {"wind_speed": 102}
|
||||||
|
},
|
||||||
|
"target_temperature": ["temperature", "small_temperature"],
|
||||||
|
"current_temperature": "indoor_temperature",
|
||||||
|
"pre_mode": "mode",
|
||||||
|
"aux_heat": "ptc",
|
||||||
|
"min_temp": 17,
|
||||||
|
"max_temp": 30,
|
||||||
|
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||||
|
"precision": PRECISION_HALVES,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.SWITCH: {
|
||||||
|
"fresh_air_remove_odor": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"rationale": [0, 1],
|
||||||
|
},
|
||||||
|
"dry": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"prevent_straight_wind": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"rationale": [0, 1]
|
||||||
|
},
|
||||||
|
"aux_heat": {
|
||||||
"device_class": SwitchDeviceClass.SWITCH,
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -121,6 +348,16 @@ DEVICE_MAPPING = {
|
|||||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
|
"outdoor_temperature": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"fresh_air_temp": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
"indoor_humidity": {
|
"indoor_humidity": {
|
||||||
"device_class": SensorDeviceClass.HUMIDITY,
|
"device_class": SensorDeviceClass.HUMIDITY,
|
||||||
"unit_of_measurement": "%",
|
"unit_of_measurement": "%",
|
||||||
@@ -129,6 +366,69 @@ DEVICE_MAPPING = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"17497071": {
|
||||||
|
"rationale": ["off", "on"],
|
||||||
|
"queries": [{}, {"query_type": "water_model_run_status"}],
|
||||||
|
"centralized": [],
|
||||||
|
"entities": {
|
||||||
|
Platform.CLIMATE: {
|
||||||
|
"thermostat": {
|
||||||
|
"power": "water_model_power",
|
||||||
|
"hvac_modes": {
|
||||||
|
"off": {"water_model_power": "off"},
|
||||||
|
"heat": {"water_model_power": "on"},
|
||||||
|
},
|
||||||
|
"preset_modes": {
|
||||||
|
"auto": {"water_model_temperature_auto": "on", "water_temp_linkage_switch": 0},
|
||||||
|
"link": {"water_model_temperature_auto": "off", "water_temp_linkage_switch": 1},
|
||||||
|
"manual": {"water_model_temperature_auto": "off", "water_temp_linkage_switch": 0}
|
||||||
|
},
|
||||||
|
"target_temperature": "water_model_temperature_set",
|
||||||
|
"current_temperature": ["temperature", "small_temperature"],
|
||||||
|
"pre_mode": "mode",
|
||||||
|
"aux_heat": "water_model_ptc",
|
||||||
|
"min_temp": 25,
|
||||||
|
"max_temp": 60,
|
||||||
|
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||||
|
"precision": PRECISION_HALVES,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.SWITCH: {
|
||||||
|
"water_model_power_save": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"water_model_go_out": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"water_model_ptc": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"translation_key": "aux_heat",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Platform.SENSOR: {
|
||||||
|
"tw1_in_water_temp": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"tw1_out_water_temp": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"humidity": {
|
||||||
|
"device_class": SensorDeviceClass.HUMIDITY,
|
||||||
|
"unit_of_measurement": "%",
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"106J6363": {
|
"106J6363": {
|
||||||
"rationale": ["off", "on"],
|
"rationale": ["off", "on"],
|
||||||
"queries": [{}],
|
"queries": [{}],
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ DEVICE_MAPPING = {
|
|||||||
"get": [
|
"get": [
|
||||||
{
|
{
|
||||||
"lvalue": "[b7_vbattery]",
|
"lvalue": "[b7_vbattery]",
|
||||||
"rvalue": "[b7_vbatt] / 1000.0"
|
"rvalue": "float([b7_vbatt] / 1000.0)"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
77
custom_components/midea_auto_cloud/device_mapping/T0xC3.py
Normal file
77
custom_components/midea_auto_cloud/device_mapping/T0xC3.py
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, \
|
||||||
|
CONCENTRATION_PARTS_PER_MILLION
|
||||||
|
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||||
|
from homeassistant.components.switch import SwitchDeviceClass
|
||||||
|
|
||||||
|
DEVICE_MAPPING = {
|
||||||
|
"default": {
|
||||||
|
"rationale": ["off", "on"],
|
||||||
|
"queries": [{}, {""}],
|
||||||
|
"centralized": [],
|
||||||
|
"entities": {
|
||||||
|
Platform.CLIMATE: {
|
||||||
|
"Zone1": {
|
||||||
|
"translation_key": "zone1",
|
||||||
|
"power": "zone1_power_state",
|
||||||
|
"hvac_modes": {
|
||||||
|
"off": {"zone1_power_state": "off"},
|
||||||
|
"heat": {"zone1_power_state": "on"},
|
||||||
|
},
|
||||||
|
"target_temperature": "room_temp_set",
|
||||||
|
"current_temperature": "t4",
|
||||||
|
"min_temp": "room_min_set_temp",
|
||||||
|
"max_temp": "room_max_set_temp",
|
||||||
|
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||||
|
"precision": PRECISION_HALVES,
|
||||||
|
},
|
||||||
|
"DHW": {
|
||||||
|
"translation_key": "dhw",
|
||||||
|
"power": "dhw_power_state",
|
||||||
|
"hvac_modes": {
|
||||||
|
"off": {"dhw_power_state": "off"},
|
||||||
|
"heat": {"dhw_power_state": "on"},
|
||||||
|
},
|
||||||
|
"target_temperature": "dhw_temp_set",
|
||||||
|
"current_temperature": "t4",
|
||||||
|
"min_temp": "dhw_min_set_temp",
|
||||||
|
"max_temp": "dhw_max_set_temp",
|
||||||
|
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||||
|
"precision": PRECISION_HALVES,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.SWITCH: {
|
||||||
|
"fastdhw_state": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"translation_key": "fastdhw_state",
|
||||||
|
},
|
||||||
|
"forcetbh_state": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"translation_key": "forcetbh_state",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Platform.SENSOR: {
|
||||||
|
"run_mode_set": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
"translation_key": "mode",
|
||||||
|
},
|
||||||
|
"room_temp_set": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT,
|
||||||
|
"translation_key": "room_temperature",
|
||||||
|
},
|
||||||
|
"t4": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT,
|
||||||
|
"translation_key": "outside_temperature",
|
||||||
|
},
|
||||||
|
"tank_actual_temp":{
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,17 +12,17 @@ DEVICE_MAPPING = {
|
|||||||
"get": [
|
"get": [
|
||||||
{
|
{
|
||||||
"lvalue": "[temperature]",
|
"lvalue": "[temperature]",
|
||||||
"rvalue": "([set_temperature] - 106) / 74 * 37 + 38"
|
"rvalue": "float(([set_temperature] - 106) / 74 * 37 + 38)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lvalue": "[cur_temperature]",
|
"lvalue": "[cur_temperature]",
|
||||||
"rvalue": "([water_box_temperature] - 106) / 74 * 37 + 38"
|
"rvalue": "float(([water_box_temperature] - 106) / 74 * 37 + 38)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"set": [
|
"set": [
|
||||||
{
|
{
|
||||||
"lvalue": "[set_temperature]",
|
"lvalue": "[set_temperature]",
|
||||||
"rvalue": "([temperature] - 38) / 37 * 74 + 106"
|
"rvalue": "float(([temperature] - 38) / 37 * 74 + 106)"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ DEVICE_MAPPING = {
|
|||||||
},
|
},
|
||||||
"bubble": {
|
"bubble": {
|
||||||
"device_class": SwitchDeviceClass.SWITCH,
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
"rationale": [0, 1],
|
||||||
},
|
},
|
||||||
"cold_water": {
|
"cold_water": {
|
||||||
"device_class": SwitchDeviceClass.SWITCH,
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
|||||||
70
custom_components/midea_auto_cloud/device_mapping/T0xE6.py
Normal file
70
custom_components/midea_auto_cloud/device_mapping/T0xE6.py
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
from homeassistant.components.switch import SwitchDeviceClass
|
||||||
|
from homeassistant.const import Platform, UnitOfElectricPotential, UnitOfTemperature, UnitOfTime, UnitOfPressure
|
||||||
|
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||||
|
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||||
|
|
||||||
|
DEVICE_MAPPING = {
|
||||||
|
"default": {
|
||||||
|
"rationale": ["off", "on"],
|
||||||
|
"queries": [{}],
|
||||||
|
"entities": {
|
||||||
|
Platform.SWITCH: {
|
||||||
|
"winter_mode": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"summer_mode": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
"power": {
|
||||||
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Platform.SENSOR: {
|
||||||
|
"heat_exchanger": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"fan_type": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"ignitor_output": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"fan_output": {
|
||||||
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
|
},
|
||||||
|
"current_heat_set_temperature": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"current_bath_set_temperature": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"heat_out_water_temperature": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"bath_out_water_temperature": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"water_gage": {
|
||||||
|
"unit_of_measurement": UnitOfPressure.PA,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Platform.BINARY_SENSOR: {
|
||||||
|
"heating_work": {
|
||||||
|
"device_class": BinarySensorDeviceClass.RUNNING
|
||||||
|
},
|
||||||
|
"bathing_work": {
|
||||||
|
"device_class": BinarySensorDeviceClass.RUNNING
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
from homeassistant.const import Platform, UnitOfTemperature, UnitOfTime, UnitOfElectricPotential, \
|
from homeassistant.const import Platform, UnitOfTemperature, UnitOfTime, UnitOfElectricPotential, \
|
||||||
UnitOfVolume, UnitOfMass
|
UnitOfVolume, UnitOfMass, PERCENTAGE
|
||||||
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||||
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||||
from homeassistant.components.switch import SwitchDeviceClass
|
from homeassistant.components.switch import SwitchDeviceClass
|
||||||
@@ -117,11 +117,16 @@ DEVICE_MAPPING = {
|
|||||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
"water_consumption_ml": {
|
"water_consumption": {
|
||||||
"device_class": SensorDeviceClass.VOLUME,
|
"device_class": SensorDeviceClass.VOLUME,
|
||||||
"unit_of_measurement": UnitOfVolume.LITERS,
|
"unit_of_measurement": UnitOfVolume.LITERS,
|
||||||
"state_class": SensorStateClass.TOTAL_INCREASING
|
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||||
},
|
},
|
||||||
|
"water_consumption_ml": {
|
||||||
|
"device_class": SensorDeviceClass.VOLUME,
|
||||||
|
"unit_of_measurement": UnitOfVolume.MILLILITERS,
|
||||||
|
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||||
|
},
|
||||||
"keep_warm_time": {
|
"keep_warm_time": {
|
||||||
"device_class": SensorDeviceClass.DURATION,
|
"device_class": SensorDeviceClass.DURATION,
|
||||||
"unit_of_measurement": UnitOfTime.MINUTES,
|
"unit_of_measurement": UnitOfTime.MINUTES,
|
||||||
@@ -246,11 +251,23 @@ DEVICE_MAPPING = {
|
|||||||
"velocity": {
|
"velocity": {
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
"device_class": SensorDeviceClass.ENUM,
|
||||||
},
|
},
|
||||||
"error": {
|
"life_1": {
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
"device_class": SensorDeviceClass.BATTERY,
|
||||||
|
"unit_of_measurement": PERCENTAGE,
|
||||||
},
|
},
|
||||||
"category": {
|
"life_2": {
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
"device_class": SensorDeviceClass.BATTERY,
|
||||||
|
"unit_of_measurement": PERCENTAGE,
|
||||||
|
},
|
||||||
|
"in_tds": {
|
||||||
|
"device_class": SensorDeviceClass.WATER,
|
||||||
|
"unit_of_measurement": "mg/L",
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
},
|
||||||
|
"out_tds": {
|
||||||
|
"device_class": SensorDeviceClass.WATER,
|
||||||
|
"unit_of_measurement": "mg/L",
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,10 +91,14 @@ class MideaFanEntity(MideaEntity, FanEntity):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def preset_modes(self):
|
def preset_modes(self):
|
||||||
|
if self._key_preset_modes is None:
|
||||||
|
return None
|
||||||
return list(self._key_preset_modes.keys())
|
return list(self._key_preset_modes.keys())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def preset_mode(self):
|
def preset_mode(self):
|
||||||
|
if self._key_preset_modes is None:
|
||||||
|
return None
|
||||||
return self._dict_get_selected(self._key_preset_modes)
|
return self._dict_get_selected(self._key_preset_modes)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -108,6 +112,10 @@ class MideaFanEntity(MideaEntity, FanEntity):
|
|||||||
def oscillating(self):
|
def oscillating(self):
|
||||||
return self._get_status_on_off(self._key_oscillate)
|
return self._get_status_on_off(self._key_oscillate)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def current_direction(self):
|
||||||
|
return self._dict_get_selected(self._key_directions)
|
||||||
|
|
||||||
async def async_turn_on(
|
async def async_turn_on(
|
||||||
self,
|
self,
|
||||||
percentage: int | None = None,
|
percentage: int | None = None,
|
||||||
@@ -147,3 +155,9 @@ class MideaFanEntity(MideaEntity, FanEntity):
|
|||||||
if self.oscillating != oscillating:
|
if self.oscillating != oscillating:
|
||||||
await self._async_set_status_on_off(self._key_oscillate, oscillating)
|
await self._async_set_status_on_off(self._key_oscillate, oscillating)
|
||||||
|
|
||||||
|
async def async_set_direction(self, direction: str):
|
||||||
|
if not self._key_directions:
|
||||||
|
return
|
||||||
|
new_status = self._key_directions.get(direction)
|
||||||
|
if new_status:
|
||||||
|
await self.async_set_attributes(new_status)
|
||||||
@@ -7,5 +7,5 @@
|
|||||||
"iot_class": "cloud_push",
|
"iot_class": "cloud_push",
|
||||||
"issue_tracker": "https://github.com/sususweet/midea-meiju-codec/issues",
|
"issue_tracker": "https://github.com/sususweet/midea-meiju-codec/issues",
|
||||||
"requirements": ["lupa>=2.0"],
|
"requirements": ["lupa>=2.0"],
|
||||||
"version": "v0.1.25"
|
"version": "v0.2.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class MideaEntity(CoordinatorEntity[MideaDataUpdateCoordinator], Entity):
|
|||||||
@property
|
@property
|
||||||
def device_attributes(self) -> dict:
|
def device_attributes(self) -> dict:
|
||||||
"""Return device attributes."""
|
"""Return device attributes."""
|
||||||
return self.coordinator.data.attributes
|
return self.coordinator.data.attributes if self.coordinator.data else {}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
@@ -181,8 +181,13 @@ class MideaEntity(CoordinatorEntity[MideaDataUpdateCoordinator], Entity):
|
|||||||
try:
|
try:
|
||||||
result = bool(self._rationale.index(status))
|
result = bool(self._rationale.index(status))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
MideaLogger.error(f"The value of attribute {attribute_key} ('{status}') "
|
if int(status) == 0:
|
||||||
|
result = False
|
||||||
|
else:
|
||||||
|
result = True
|
||||||
|
MideaLogger.info(f"The value of attribute {attribute_key} ('{status}') "
|
||||||
f"is not in rationale {self._rationale}")
|
f"is not in rationale {self._rationale}")
|
||||||
|
return result
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _set_nested_value(self, attribute_key: str, value: Any) -> None:
|
def _set_nested_value(self, attribute_key: str, value: Any) -> None:
|
||||||
|
|||||||
@@ -56,6 +56,13 @@ class MideaSelectEntity(MideaEntity, SelectEntity):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def options(self):
|
def options(self):
|
||||||
|
"""Return a list of available options.
|
||||||
|
|
||||||
|
Note: To translate options, add translations in the translation file under:
|
||||||
|
entity.select.{translation_key}.state.{option_key}
|
||||||
|
|
||||||
|
Home Assistant will automatically use these translations when displaying options.
|
||||||
|
"""
|
||||||
return list(self._key_options.keys())
|
return list(self._key_options.keys())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -123,6 +123,12 @@
|
|||||||
},
|
},
|
||||||
"entity": {
|
"entity": {
|
||||||
"binary_sensor": {
|
"binary_sensor": {
|
||||||
|
"heating_work": {
|
||||||
|
"name": "Heating Work Status"
|
||||||
|
},
|
||||||
|
"bathing_work": {
|
||||||
|
"name": "Bathing Work Status"
|
||||||
|
},
|
||||||
"doorswitch": {
|
"doorswitch": {
|
||||||
"name": "Door Switch"
|
"name": "Door Switch"
|
||||||
},
|
},
|
||||||
@@ -314,6 +320,13 @@
|
|||||||
"thermostat": {
|
"thermostat": {
|
||||||
"name": "Thermostat",
|
"name": "Thermostat",
|
||||||
"state_attributes": {
|
"state_attributes": {
|
||||||
|
"preset_modes": {
|
||||||
|
"state": {
|
||||||
|
"auto": "auto",
|
||||||
|
"link": "link",
|
||||||
|
"manual": "manual"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fan_mode": {
|
"fan_mode": {
|
||||||
"state": {
|
"state": {
|
||||||
"silent": "Silent",
|
"silent": "Silent",
|
||||||
@@ -322,15 +335,41 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"zone1": {
|
||||||
|
"name": "zone 1"
|
||||||
|
},
|
||||||
|
"dhw": {
|
||||||
|
"name": "DHW"
|
||||||
|
},
|
||||||
"colmo_turing_central_ac_climate": {
|
"colmo_turing_central_ac_climate": {
|
||||||
"name": "Thermostat",
|
"name": "Thermostat",
|
||||||
"state_attributes": {
|
"state_attributes": {
|
||||||
"fan_mode": {
|
"fan_mode": {
|
||||||
"state": {
|
"state": {
|
||||||
"silent": "Silent",
|
"silent": "silent",
|
||||||
"full": "Full"
|
"low": "low",
|
||||||
|
"medium": "medium",
|
||||||
|
"high": "high",
|
||||||
|
"full": "full",
|
||||||
|
"auto": "auto"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"preset_modes": {
|
||||||
|
"state": {
|
||||||
|
"none": "none",
|
||||||
|
"eco": "eco",
|
||||||
|
"comfort": "comfort",
|
||||||
|
"boost": "boost"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"state": {
|
||||||
|
"off": "off",
|
||||||
|
"heat": "heat",
|
||||||
|
"cool": "cool",
|
||||||
|
"auto": "auto",
|
||||||
|
"dry": "dry",
|
||||||
|
"fan_only": "fan only"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"water_heater": {
|
"water_heater": {
|
||||||
@@ -349,6 +388,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
|
"follow_body_sense": {
|
||||||
|
"name": "Follow Body Sense"
|
||||||
|
},
|
||||||
"bright": {
|
"bright": {
|
||||||
"name": "Brightness"
|
"name": "Brightness"
|
||||||
},
|
},
|
||||||
@@ -358,6 +400,9 @@
|
|||||||
"humidity": {
|
"humidity": {
|
||||||
"name": "Humidity"
|
"name": "Humidity"
|
||||||
},
|
},
|
||||||
|
"b3_function_control": {
|
||||||
|
"name": "Disinfection Cabinet Control"
|
||||||
|
},
|
||||||
"b6_power": {
|
"b6_power": {
|
||||||
"name": "Smoke Machine Power"
|
"name": "Smoke Machine Power"
|
||||||
},
|
},
|
||||||
@@ -419,7 +464,13 @@
|
|||||||
"name": "DB Temperature"
|
"name": "DB Temperature"
|
||||||
},
|
},
|
||||||
"water_level": {
|
"water_level": {
|
||||||
"name": "Water Level"
|
"name": "Water Level",
|
||||||
|
"state": {
|
||||||
|
"low": "low",
|
||||||
|
"medium": "medium",
|
||||||
|
"high": "high",
|
||||||
|
"auto": "auto"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"db_water_level": {
|
"db_water_level": {
|
||||||
"name": "DB Water Level"
|
"name": "DB Water Level"
|
||||||
@@ -479,7 +530,13 @@
|
|||||||
"name": "Middle Stair Work Status"
|
"name": "Middle Stair Work Status"
|
||||||
},
|
},
|
||||||
"mode": {
|
"mode": {
|
||||||
"name": "Mode"
|
"name": "Mode",
|
||||||
|
"state": {
|
||||||
|
"normal": "normal",
|
||||||
|
"factory_test": "factory test",
|
||||||
|
"service": "service",
|
||||||
|
"normal_continus": "normal continus"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"mode_state": {
|
"mode_state": {
|
||||||
"name": "Mode State"
|
"name": "Mode State"
|
||||||
@@ -494,7 +551,100 @@
|
|||||||
"name": "Prevent Wrinkle"
|
"name": "Prevent Wrinkle"
|
||||||
},
|
},
|
||||||
"program": {
|
"program": {
|
||||||
"name": "Program"
|
"name": "Program",
|
||||||
|
"state": {
|
||||||
|
"cotton": "cotton",
|
||||||
|
"eco": "eco",
|
||||||
|
"fast_wash": "fast wash 15min",
|
||||||
|
"mixed_wash": "mixed wash",
|
||||||
|
"wool": "wool",
|
||||||
|
"ssp": "self-cleaning mode",
|
||||||
|
"sport_clothes": "sport clothes",
|
||||||
|
"single_dehytration": "single dehytration",
|
||||||
|
"rinsing_dehydration": "rinsing and dehydration",
|
||||||
|
"big": "big clothes",
|
||||||
|
"baby_clothes": "baby clothes",
|
||||||
|
"down_jacket": "down jacket",
|
||||||
|
"color": "color clothes",
|
||||||
|
"intelligent": "intelligent",
|
||||||
|
"quick_wash": "quick wash",
|
||||||
|
"shirt": "shirt",
|
||||||
|
"fiber": "fiber",
|
||||||
|
"enzyme": "enzyme",
|
||||||
|
"underwear": "underwear",
|
||||||
|
"outdoor": "outdoor",
|
||||||
|
"air_wash": "air wash",
|
||||||
|
"single_drying": "single drying",
|
||||||
|
"steep": "steep",
|
||||||
|
"kids": "kids",
|
||||||
|
"water_cotton": "water cotton",
|
||||||
|
"fast_wash_30": "fast wash 30min",
|
||||||
|
"fast_wash_60": "fast wash 60min",
|
||||||
|
"water_mixed_wash": "water mixed wash",
|
||||||
|
"water_fiber": "water fiber",
|
||||||
|
"water_kids": "water kids",
|
||||||
|
"water_underwear": "water underwear",
|
||||||
|
"specialist": "specialist wash",
|
||||||
|
"love": "love wash",
|
||||||
|
"water_intelligent": "water intelligent",
|
||||||
|
"water_steep": "water steep",
|
||||||
|
"water_fast_wash_30": "water fast wash 30min",
|
||||||
|
"new_water_cotton": "new water cotton",
|
||||||
|
"water_eco": "water eco",
|
||||||
|
"wash_drying_60": "wash drying 60min",
|
||||||
|
"self_wash_5": "self wash 5min",
|
||||||
|
"fast_wash_min": "fast wash(min)",
|
||||||
|
"mixed_wash_min": "mixed wash(min)",
|
||||||
|
"dehydration_min": "dehydration(min)",
|
||||||
|
"self_wash_min": "self wash(min)",
|
||||||
|
"baby_clothes_min": "baby clothes(min)",
|
||||||
|
"diy0": "diy0",
|
||||||
|
"diy1": "diy1",
|
||||||
|
"diy2": "diy2",
|
||||||
|
"silk_wash": "silk wash",
|
||||||
|
"prevent_allergy": "prevent allergy",
|
||||||
|
"cold_wash": "cold wash",
|
||||||
|
"soft_wash": "soft wash",
|
||||||
|
"remove_mite_wash": "remove mite wash",
|
||||||
|
"water_intense_wash": "water intense wash",
|
||||||
|
"fast_dry": "fast dry",
|
||||||
|
"water_outdoor": "water outdoor",
|
||||||
|
"spring_autumn_wash": "spring autumn wash",
|
||||||
|
"summer_wash": "summer wash",
|
||||||
|
"winter_wash": "winter wash",
|
||||||
|
"jean": "jean",
|
||||||
|
"new_clothes_wash": "new clothes wash",
|
||||||
|
"silk": "silk",
|
||||||
|
"insight_wash": "insight wash",
|
||||||
|
"fitness_clothes": "fitness clothes",
|
||||||
|
"mink": "mink",
|
||||||
|
"fresh_air": "fresh air",
|
||||||
|
"bucket_dry": "bucket dry",
|
||||||
|
"jacket": "jacket",
|
||||||
|
"bath_towel": "bath towel",
|
||||||
|
"night_fresh_wash": "night fresh wash",
|
||||||
|
"heart_wash": "heart wash",
|
||||||
|
"water_cold_wash": "water cold wash",
|
||||||
|
"water_prevent_allergy": "water prevent allergy",
|
||||||
|
"water_remove_mite_wash": "water remove mite wash",
|
||||||
|
"water_ssp": "water self-cleaning mode",
|
||||||
|
"standard": "standard",
|
||||||
|
"green_wool": "green wool",
|
||||||
|
"cook_wash": "cook wash",
|
||||||
|
"fresh_remove_wrinkle": "fresh remove wrinkle",
|
||||||
|
"steam_sterilize_wash": "steam sterilize wash",
|
||||||
|
"aromatherapy": "aromatherapy",
|
||||||
|
"sterilize_wash": "sterilize wash",
|
||||||
|
"white_clothes_clean": "white clothes clean",
|
||||||
|
"clean_stains": "clean stains",
|
||||||
|
"tube_clean_all": "tube clean all",
|
||||||
|
"no_channeling_color": "no channeling color",
|
||||||
|
"scald_wash": "scald wash",
|
||||||
|
"hanfu_spring_summer": "hanfu spring summer",
|
||||||
|
"hanfu_autumn_winter": "hanfu autumn winter",
|
||||||
|
"skin_care_wash": "skin care wash",
|
||||||
|
"hanfu_wash": "hanfu wash"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"query_type": {
|
"query_type": {
|
||||||
"name": "Query Type"
|
"name": "Query Type"
|
||||||
@@ -553,6 +703,44 @@
|
|||||||
"work_mode": {
|
"work_mode": {
|
||||||
"name": "Work Mode"
|
"name": "Work Mode"
|
||||||
},
|
},
|
||||||
|
"wash_mode": {
|
||||||
|
"name": "wash mode",
|
||||||
|
"state": {
|
||||||
|
"neutral_gear": "neutral gear",
|
||||||
|
"auto_wash": "auto wash",
|
||||||
|
"strong_wash": "strong wash",
|
||||||
|
"standard_wash": "standard wash",
|
||||||
|
"eco_wash": "eco wash",
|
||||||
|
"glass_wash": "glass wash",
|
||||||
|
"hour_wash": "hour wash",
|
||||||
|
"fast_wash": "fast wash",
|
||||||
|
"soak_wash": "soak wash",
|
||||||
|
"90min_wash": "90min wash",
|
||||||
|
"self_clean": "self clean",
|
||||||
|
"fruit_wash": "fruit wash",
|
||||||
|
"self_define": "self define",
|
||||||
|
"germ": "germ",
|
||||||
|
"bowl_wash": "bowl wash",
|
||||||
|
"kill_germ": "kill germ",
|
||||||
|
"seafood_wash": "seafood wash",
|
||||||
|
"hotpot_wash": "hotpot wash",
|
||||||
|
"quietnight_wash": "quietnight wash",
|
||||||
|
"less_wash": "less wash",
|
||||||
|
"oilnet_wash": "oilnet wash",
|
||||||
|
"max_rapid_wash": "max rapid wash",
|
||||||
|
"hot_bowl_wash": "hot bowl wash",
|
||||||
|
"cloud_wash": "cloud wash",
|
||||||
|
"baby_wash": "baby wash",
|
||||||
|
"single_dry": "single dry",
|
||||||
|
"single_disinfect": "single disinfect",
|
||||||
|
"wahin_wash_dry": "wahin wash dry",
|
||||||
|
"high_temp_wash": "high temp wash",
|
||||||
|
"wash_dry": "wash dry",
|
||||||
|
"auto_dry": "auto dry",
|
||||||
|
"fire_disinfect": "fire disinfect",
|
||||||
|
"toy_wash": "toy wash"
|
||||||
|
}
|
||||||
|
},
|
||||||
"func_select": {
|
"func_select": {
|
||||||
"name": "Func Select"
|
"name": "Func Select"
|
||||||
},
|
},
|
||||||
@@ -563,10 +751,14 @@
|
|||||||
"name": "Type Select"
|
"name": "Type Select"
|
||||||
},
|
},
|
||||||
"work_status": {
|
"work_status": {
|
||||||
"name": "Work Status"
|
"name": "Work Status",
|
||||||
},
|
"state": {
|
||||||
"wash_mode": {
|
"power_off": "power off",
|
||||||
"name": "Wash Mode"
|
"power_on": "power on",
|
||||||
|
"cancel": "cancel",
|
||||||
|
"pause": "pause",
|
||||||
|
"resume": "resume"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"voice": {
|
"voice": {
|
||||||
"name": "Voice"
|
"name": "Voice"
|
||||||
@@ -636,6 +828,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sensor": {
|
"sensor": {
|
||||||
|
"fresh_air_temp": {
|
||||||
|
"name": "Fresh Air Temp"
|
||||||
|
},
|
||||||
"running_status": {
|
"running_status": {
|
||||||
"name": "Running Status"
|
"name": "Running Status"
|
||||||
},
|
},
|
||||||
@@ -681,6 +876,21 @@
|
|||||||
"auto_min_set_temp": {
|
"auto_min_set_temp": {
|
||||||
"name": "Auto Min Set Temp"
|
"name": "Auto Min Set Temp"
|
||||||
},
|
},
|
||||||
|
"b3_upstair_status": {
|
||||||
|
"name": "Disinfection Cabinet Status"
|
||||||
|
},
|
||||||
|
"b7_left_status": {
|
||||||
|
"name": "Left Stove Status"
|
||||||
|
},
|
||||||
|
"b7_left_gear": {
|
||||||
|
"name": "Left Stove Gear"
|
||||||
|
},
|
||||||
|
"b7_right_status": {
|
||||||
|
"name": "Right Stove Status"
|
||||||
|
},
|
||||||
|
"b7_right_gear": {
|
||||||
|
"name": "Left Stove Gear"
|
||||||
|
},
|
||||||
"bath_out_volume": {
|
"bath_out_volume": {
|
||||||
"name": "Bath Out Volume"
|
"name": "Bath Out Volume"
|
||||||
},
|
},
|
||||||
@@ -1395,6 +1605,48 @@
|
|||||||
"ud_diy_up_percent": {
|
"ud_diy_up_percent": {
|
||||||
"name": "UD DIY Up Percent"
|
"name": "UD DIY Up Percent"
|
||||||
},
|
},
|
||||||
|
"heat_exchanger": {
|
||||||
|
"name": "Heat Exchanger Mode"
|
||||||
|
},
|
||||||
|
"fan_type": {
|
||||||
|
"name": "Fan Type"
|
||||||
|
},
|
||||||
|
"ignitor_output": {
|
||||||
|
"name": "Ignitor Output"
|
||||||
|
},
|
||||||
|
"fan_output": {
|
||||||
|
"name": "Fan Output"
|
||||||
|
},
|
||||||
|
"current_heat_set_temperature": {
|
||||||
|
"name": "Current Heat Set Temperature"
|
||||||
|
},
|
||||||
|
"current_bath_set_temperature": {
|
||||||
|
"name": "Current Bath Set Temperature"
|
||||||
|
},
|
||||||
|
"heat_out_water_temperature": {
|
||||||
|
"name": "Heat Out Water Temperature"
|
||||||
|
},
|
||||||
|
"bath_out_water_temperature": {
|
||||||
|
"name": "Bath Out Water Temperature"
|
||||||
|
},
|
||||||
|
"water_gage": {
|
||||||
|
"name": "Water Gage"
|
||||||
|
},
|
||||||
|
"in_tds": {
|
||||||
|
"name": "In TDS"
|
||||||
|
},
|
||||||
|
"out_tds": {
|
||||||
|
"name": "Out TDS"
|
||||||
|
},
|
||||||
|
"life_1": {
|
||||||
|
"name": "RO Filter Cartridge Lifespan"
|
||||||
|
},
|
||||||
|
"life_2": {
|
||||||
|
"name": "MPC Filter Cartridge Lifespan"
|
||||||
|
},
|
||||||
|
"water_consumption": {
|
||||||
|
"name": "Water Consumption"
|
||||||
|
},
|
||||||
"water_consumption_ml": {
|
"water_consumption_ml": {
|
||||||
"name": "Water Consumption (ml)"
|
"name": "Water Consumption (ml)"
|
||||||
},
|
},
|
||||||
@@ -1517,6 +1769,12 @@
|
|||||||
},
|
},
|
||||||
"heat_temp_set": {
|
"heat_temp_set": {
|
||||||
"name": "Heat Temperature Set"
|
"name": "Heat Temperature Set"
|
||||||
|
},
|
||||||
|
"tw1_in_water_temp": {
|
||||||
|
"name": "Inlet Water Temperature"
|
||||||
|
},
|
||||||
|
"tw1_out_water_temp": {
|
||||||
|
"name": "Outlet Water Temperature"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"light": {
|
"light": {
|
||||||
@@ -1580,8 +1838,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"switch": {
|
"switch": {
|
||||||
"follow_body_sense": {
|
"winter_mode": {
|
||||||
"name": "Follow Body Sense"
|
"name": "Winter Mode"
|
||||||
|
},
|
||||||
|
"summer_mode": {
|
||||||
|
"name": "Summer Mode"
|
||||||
},
|
},
|
||||||
"waterions": {
|
"waterions": {
|
||||||
"name": "Disinfection"
|
"name": "Disinfection"
|
||||||
@@ -2476,6 +2737,18 @@
|
|||||||
},
|
},
|
||||||
"work_switch": {
|
"work_switch": {
|
||||||
"name": "Work Switch"
|
"name": "Work Switch"
|
||||||
|
},
|
||||||
|
"water_model_power_save": {
|
||||||
|
"name": "Power Save Mode"
|
||||||
|
},
|
||||||
|
"water_model_go_out": {
|
||||||
|
"name": "Away Mode"
|
||||||
|
},
|
||||||
|
"fastdhw_state": {
|
||||||
|
"name": "Fast Hot Water"
|
||||||
|
},
|
||||||
|
"forcetbh_state": {
|
||||||
|
"name": "Force Standby"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,12 @@
|
|||||||
},
|
},
|
||||||
"entity": {
|
"entity": {
|
||||||
"binary_sensor": {
|
"binary_sensor": {
|
||||||
|
"heating_work": {
|
||||||
|
"name": "采暖功能状态"
|
||||||
|
},
|
||||||
|
"bathing_work": {
|
||||||
|
"name": "生活热水工作状态"
|
||||||
|
},
|
||||||
"doorswitch": {
|
"doorswitch": {
|
||||||
"name": "门锁开关"
|
"name": "门锁开关"
|
||||||
},
|
},
|
||||||
@@ -225,7 +231,7 @@
|
|||||||
"softener_lack": {
|
"softener_lack": {
|
||||||
"name": "柔顺剂不足"
|
"name": "柔顺剂不足"
|
||||||
},
|
},
|
||||||
"detergent_lack": {
|
"detergent_lack": {
|
||||||
"name": "洗涤剂不足"
|
"name": "洗涤剂不足"
|
||||||
},
|
},
|
||||||
"door_opened": {
|
"door_opened": {
|
||||||
@@ -314,6 +320,13 @@
|
|||||||
"thermostat": {
|
"thermostat": {
|
||||||
"name": "温控器",
|
"name": "温控器",
|
||||||
"state_attributes": {
|
"state_attributes": {
|
||||||
|
"preset_modes": {
|
||||||
|
"state": {
|
||||||
|
"auto": "自动",
|
||||||
|
"link": "联动",
|
||||||
|
"manual": "手动"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fan_mode": {
|
"fan_mode": {
|
||||||
"state": {
|
"state": {
|
||||||
"silent": "静音",
|
"silent": "静音",
|
||||||
@@ -322,19 +335,41 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"zone1": {
|
||||||
|
"name": "区域1"
|
||||||
|
},
|
||||||
|
"dhw": {
|
||||||
|
"name": "DHW"
|
||||||
|
},
|
||||||
"colmo_turing_central_ac_climate": {
|
"colmo_turing_central_ac_climate": {
|
||||||
"name": "温控器",
|
"name": "温控器",
|
||||||
"state_attributes": {
|
"state_attributes": {
|
||||||
"fan_mode": {
|
"fan_mode": {
|
||||||
"state": {
|
"state": {
|
||||||
"silent": "静音",
|
"silent": "静音",
|
||||||
"full": "强劲"
|
"low": "低速",
|
||||||
|
"medium": "中速",
|
||||||
|
"high": "高速",
|
||||||
|
"full": "强劲",
|
||||||
|
"auto": "自动风"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"preset_modes": {
|
||||||
|
"state": {
|
||||||
|
"none": "无预设",
|
||||||
|
"eco": "节能模式",
|
||||||
|
"comfort": "舒适模式",
|
||||||
|
"boost": "强劲模式"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"state": {
|
"state": {
|
||||||
|
"off": "关闭",
|
||||||
|
"heat": "制热",
|
||||||
|
"cool": "制冷",
|
||||||
"auto": "温湿灵控",
|
"auto": "温湿灵控",
|
||||||
"dry": "自动抽湿"
|
"dry": "自动抽湿",
|
||||||
|
"fan_only": "仅送风"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"water_heater": {
|
"water_heater": {
|
||||||
@@ -353,6 +388,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
|
"follow_body_sense": {
|
||||||
|
"name": "随身感"
|
||||||
|
},
|
||||||
"bright": {
|
"bright": {
|
||||||
"name": "亮度"
|
"name": "亮度"
|
||||||
},
|
},
|
||||||
@@ -362,6 +400,9 @@
|
|||||||
"humidity": {
|
"humidity": {
|
||||||
"name": "设定湿度"
|
"name": "设定湿度"
|
||||||
},
|
},
|
||||||
|
"b3_function_control": {
|
||||||
|
"name": "消毒柜控制"
|
||||||
|
},
|
||||||
"b6_power": {
|
"b6_power": {
|
||||||
"name": "烟机开关"
|
"name": "烟机开关"
|
||||||
},
|
},
|
||||||
@@ -411,10 +452,105 @@
|
|||||||
"name": "位置"
|
"name": "位置"
|
||||||
},
|
},
|
||||||
"db_program": {
|
"db_program": {
|
||||||
"name": "洗涤程序"
|
"name": "洗涤程序",
|
||||||
|
"state": {
|
||||||
|
"cotton": "棉麻",
|
||||||
|
"eco": "节能",
|
||||||
|
"fast_wash": "快洗",
|
||||||
|
"mixed_wash": "混合洗",
|
||||||
|
"wool": "羊毛",
|
||||||
|
"ssp": "SSP",
|
||||||
|
"sport_clothes": "运动服",
|
||||||
|
"single_dehytration": "单脱水",
|
||||||
|
"rinsing_dehydration": "漂洗脱水",
|
||||||
|
"big": "大件",
|
||||||
|
"baby_clothes": "婴儿服",
|
||||||
|
"down_jacket": "羽绒服",
|
||||||
|
"color": "彩色",
|
||||||
|
"intelligent": "智能",
|
||||||
|
"quick_wash": "快速洗",
|
||||||
|
"shirt": "衬衫",
|
||||||
|
"fiber": "化纤",
|
||||||
|
"enzyme": "酶洗",
|
||||||
|
"underwear": "内衣",
|
||||||
|
"outdoor": "户外",
|
||||||
|
"air_wash": "空气洗",
|
||||||
|
"single_drying": "单烘干",
|
||||||
|
"steep": "浸泡",
|
||||||
|
"kids": "童装",
|
||||||
|
"water_baby_clothes": "水洗婴儿服",
|
||||||
|
"fast_wash_30": "快洗30",
|
||||||
|
"water_shirt": "水洗衬衫",
|
||||||
|
"water_mixed_wash": "水洗混合",
|
||||||
|
"water_fiber": "水洗化纤",
|
||||||
|
"water_kids": "水洗童装",
|
||||||
|
"water_underwear": "水洗内衣",
|
||||||
|
"specialist": "专家",
|
||||||
|
"love": "爱心",
|
||||||
|
"water_intelligent": "水洗智能",
|
||||||
|
"water_steep": "水洗浸泡",
|
||||||
|
"water_fast_wash_30": "水洗快洗30",
|
||||||
|
"new_water_cotton": "新水洗棉",
|
||||||
|
"water_eco": "水洗节能",
|
||||||
|
"wash_drying_60": "洗烘60",
|
||||||
|
"self_wash_5": "自洁5",
|
||||||
|
"fast_wash_min": "快洗分钟",
|
||||||
|
"mixed_wash_min": "混合洗分钟",
|
||||||
|
"dehydration_min": "脱水分钟",
|
||||||
|
"self_wash_min": "自洁分钟",
|
||||||
|
"baby_clothes_min": "婴儿服分钟",
|
||||||
|
"silk_wash": "真丝洗",
|
||||||
|
"prevent_allergy": "防过敏",
|
||||||
|
"cold_wash": "冷水洗",
|
||||||
|
"soft_wash": "轻柔洗",
|
||||||
|
"remove_mite_wash": "除螨洗",
|
||||||
|
"water_intense_wash": "水洗强洗",
|
||||||
|
"fast_dry": "快干",
|
||||||
|
"water_outdoor": "水洗户外",
|
||||||
|
"spring_autumn_wash": "春秋洗",
|
||||||
|
"summer_wash": "夏季洗",
|
||||||
|
"winter_wash": "冬季洗",
|
||||||
|
"jean": "牛仔",
|
||||||
|
"new_clothes_wash": "新衣洗",
|
||||||
|
"silk": "真丝",
|
||||||
|
"insight_wash": "洞察洗",
|
||||||
|
"fitness_clothes": "健身服",
|
||||||
|
"mink": "貂皮",
|
||||||
|
"fresh_air": "新风",
|
||||||
|
"bucket_dry": "桶烘干",
|
||||||
|
"jacket": "夹克",
|
||||||
|
"bath_towel": "浴巾",
|
||||||
|
"night_fresh_wash": "夜间清新洗",
|
||||||
|
"degerm": "除菌",
|
||||||
|
"heart_wash": "爱心洗",
|
||||||
|
"water_cold_wash": "水洗冷水",
|
||||||
|
"water_prevent_allergy": "水洗防过敏",
|
||||||
|
"water_remove_mite_wash": "水洗除螨",
|
||||||
|
"water_ssp": "水洗SSP",
|
||||||
|
"standard": "标准",
|
||||||
|
"green_wool": "绿色羊毛",
|
||||||
|
"cook_wash": "烹饪洗",
|
||||||
|
"fresh_remove_wrinkle": "清新去皱",
|
||||||
|
"steam_sterilize_wash": "蒸汽杀菌洗",
|
||||||
|
"sterilize_wash": "杀菌洗",
|
||||||
|
"white_clothes_clean": "白衣清洁",
|
||||||
|
"clean_stains": "去渍",
|
||||||
|
"prevent_cross_color": "防串色",
|
||||||
|
"quick_dry_clothes": "快干衣物",
|
||||||
|
"yoga_clothes": "瑜伽服"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"db_running_status": {
|
"db_running_status": {
|
||||||
"name": "运行状态"
|
"name": "运行状态",
|
||||||
|
"state": {
|
||||||
|
"off": "关闭",
|
||||||
|
"standby": "待机",
|
||||||
|
"start": "启动",
|
||||||
|
"pause": "暂停",
|
||||||
|
"end": "结束",
|
||||||
|
"fault": "故障",
|
||||||
|
"delay": "延时"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"db_softener": {
|
"db_softener": {
|
||||||
"name": "柔顺剂"
|
"name": "柔顺剂"
|
||||||
@@ -423,7 +559,13 @@
|
|||||||
"name": "温度"
|
"name": "温度"
|
||||||
},
|
},
|
||||||
"water_level": {
|
"water_level": {
|
||||||
"name": "水位"
|
"name": "水位",
|
||||||
|
"state": {
|
||||||
|
"low": "低",
|
||||||
|
"medium": "中",
|
||||||
|
"high": "高",
|
||||||
|
"auto": "自动"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"db_water_level": {
|
"db_water_level": {
|
||||||
"name": "水位"
|
"name": "水位"
|
||||||
@@ -483,7 +625,13 @@
|
|||||||
"name": "中层工作状态"
|
"name": "中层工作状态"
|
||||||
},
|
},
|
||||||
"mode": {
|
"mode": {
|
||||||
"name": "模式"
|
"name": "运行模式",
|
||||||
|
"state": {
|
||||||
|
"normal": "正常",
|
||||||
|
"factory_test": "工厂测试",
|
||||||
|
"service": "服务",
|
||||||
|
"normal_continus": "正常连续"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"mode_state": {
|
"mode_state": {
|
||||||
"name": "模式状态"
|
"name": "模式状态"
|
||||||
@@ -498,7 +646,100 @@
|
|||||||
"name": "防皱"
|
"name": "防皱"
|
||||||
},
|
},
|
||||||
"program": {
|
"program": {
|
||||||
"name": "程序"
|
"name": "程序",
|
||||||
|
"state": {
|
||||||
|
"cotton": "棉麻",
|
||||||
|
"eco": "节能洗",
|
||||||
|
"fast_wash": "快速15",
|
||||||
|
"mixed_wash": "混合洗",
|
||||||
|
"wool": "羊毛",
|
||||||
|
"ssp": "筒自洁",
|
||||||
|
"sport_clothes": "运动服",
|
||||||
|
"single_dehytration": "单脱水",
|
||||||
|
"rinsing_dehydration": "漂洗+脱水",
|
||||||
|
"big": "大件",
|
||||||
|
"baby_clothes": "婴儿服",
|
||||||
|
"down_jacket": "羽绒服",
|
||||||
|
"color": "彩色衣物",
|
||||||
|
"intelligent": "智能洗",
|
||||||
|
"quick_wash": "快洗",
|
||||||
|
"shirt": "衬衫",
|
||||||
|
"fiber": "化纤",
|
||||||
|
"enzyme": "酵素洗",
|
||||||
|
"underwear": "内衣",
|
||||||
|
"outdoor": "户外服",
|
||||||
|
"air_wash": "空气洗",
|
||||||
|
"single_drying": "单烘干",
|
||||||
|
"steep": "浸泡洗",
|
||||||
|
"kids": "儿童衣物",
|
||||||
|
"water_cotton": "水韵棉织物",
|
||||||
|
"fast_wash_30": "速洗30",
|
||||||
|
"fast_wash_60": "60分钟快速洗",
|
||||||
|
"water_mixed_wash": "水韵混合洗",
|
||||||
|
"water_fiber": "水韵化纤",
|
||||||
|
"water_kids": "水韵儿童衣物",
|
||||||
|
"water_underwear": "水韵内衣",
|
||||||
|
"specialist": "专业洗",
|
||||||
|
"love": "爱心洗",
|
||||||
|
"water_intelligent": "水韵智能洗",
|
||||||
|
"water_steep": "水韵浸泡洗",
|
||||||
|
"water_fast_wash_30": "水韵30分钟快速洗",
|
||||||
|
"new_water_cotton": "新水韵棉织物",
|
||||||
|
"water_eco": "水韵节能",
|
||||||
|
"wash_drying_60": "洗烘60分钟",
|
||||||
|
"self_wash_5": "自清洁5分钟",
|
||||||
|
"fast_wash_min": "快速洗(分钟)",
|
||||||
|
"mixed_wash_min": "混合洗(分钟)",
|
||||||
|
"dehydration_min": "脱水(分钟)",
|
||||||
|
"self_wash_min": "自清洁(分钟)",
|
||||||
|
"baby_clothes_min": "婴儿服(分钟)",
|
||||||
|
"diy0": "自定义0",
|
||||||
|
"diy1": "自定义1",
|
||||||
|
"diy2": "自定义2",
|
||||||
|
"silk_wash": "丝绸洗",
|
||||||
|
"prevent_allergy": "防过敏",
|
||||||
|
"cold_wash": "冷水洗",
|
||||||
|
"soft_wash": "轻柔洗",
|
||||||
|
"remove_mite_wash": "除螨洗",
|
||||||
|
"water_intense_wash": "水韵强力洗",
|
||||||
|
"fast_dry": "快速烘干",
|
||||||
|
"water_outdoor": "水韵户外服",
|
||||||
|
"spring_autumn_wash": "春秋洗",
|
||||||
|
"summer_wash": "夏季洗",
|
||||||
|
"winter_wash": "冬季洗",
|
||||||
|
"jean": "牛仔服",
|
||||||
|
"new_clothes_wash": "新衣洗",
|
||||||
|
"silk": "丝绸",
|
||||||
|
"insight_wash": "洞察洗",
|
||||||
|
"fitness_clothes": "健身服",
|
||||||
|
"mink": "貂皮",
|
||||||
|
"fresh_air": "清新空气",
|
||||||
|
"bucket_dry": "桶烘干",
|
||||||
|
"jacket": "冲锋衣",
|
||||||
|
"bath_towel": "浴巾",
|
||||||
|
"night_fresh_wash": "夜间清新洗",
|
||||||
|
"heart_wash": "爱心洗",
|
||||||
|
"water_cold_wash": "水韵冷水洗",
|
||||||
|
"water_prevent_allergy": "水韵防过敏",
|
||||||
|
"water_remove_mite_wash": "水韵除螨洗",
|
||||||
|
"water_ssp": "水韵超净洗",
|
||||||
|
"standard": "标准洗",
|
||||||
|
"green_wool": "绿色羊毛",
|
||||||
|
"cook_wash": "厨师服洗",
|
||||||
|
"fresh_remove_wrinkle": "清新除皱",
|
||||||
|
"steam_sterilize_wash": "蒸汽消毒洗",
|
||||||
|
"aromatherapy": "香薰洗",
|
||||||
|
"sterilize_wash": "杀菌洗",
|
||||||
|
"white_clothes_clean": "白衣洁净",
|
||||||
|
"clean_stains": "污渍清洁",
|
||||||
|
"tube_clean_all": "筒自洁(全)",
|
||||||
|
"no_channeling_color": "防串色",
|
||||||
|
"scald_wash": "烫洗",
|
||||||
|
"hanfu_spring_summer": "汉服(春夏)",
|
||||||
|
"hanfu_autumn_winter": "汉服(秋冬)",
|
||||||
|
"skin_care_wash": "护肤洗",
|
||||||
|
"hanfu_wash": "汉服洗"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"query_type": {
|
"query_type": {
|
||||||
"name": "查询类型"
|
"name": "查询类型"
|
||||||
@@ -558,7 +799,42 @@
|
|||||||
"name": "工作模式"
|
"name": "工作模式"
|
||||||
},
|
},
|
||||||
"wash_mode": {
|
"wash_mode": {
|
||||||
"name": "洗涤模式"
|
"name": "洗涤模式",
|
||||||
|
"state": {
|
||||||
|
"neutral_gear": "待机",
|
||||||
|
"auto_wash": "智能洗",
|
||||||
|
"strong_wash": "超强洗",
|
||||||
|
"standard_wash": "标准洗",
|
||||||
|
"eco_wash": "节能洗",
|
||||||
|
"glass_wash": "玻璃洗",
|
||||||
|
"hour_wash": "小时洗",
|
||||||
|
"fast_wash": "快速洗",
|
||||||
|
"soak_wash": "预冲洗",
|
||||||
|
"90min_wash": "90分钟洗",
|
||||||
|
"self_clean": "自清洁",
|
||||||
|
"fruit_wash": "果蔬洗",
|
||||||
|
"self_define": "自定义洗",
|
||||||
|
"germ": "消毒洗",
|
||||||
|
"bowl_wash": "碗具洗",
|
||||||
|
"kill_germ": "杀菌洗",
|
||||||
|
"seafood_wash": "海鲜洗",
|
||||||
|
"hotpot_wash": "火锅洗",
|
||||||
|
"quietnight_wash": "夜间静音洗",
|
||||||
|
"less_wash": "轻量洗",
|
||||||
|
"oilnet_wash": "油网洗",
|
||||||
|
"max_rapid_wash": "超强快洗",
|
||||||
|
"hot_bowl_wash": "热碗洗",
|
||||||
|
"cloud_wash": "云感洗",
|
||||||
|
"baby_wash": "婴儿洗",
|
||||||
|
"single_dry": "单烘干",
|
||||||
|
"single_disinfect": "蒸汽消毒",
|
||||||
|
"wahin_wash_dry": "一键洗烘",
|
||||||
|
"high_temp_wash": "高温洗",
|
||||||
|
"wash_dry": "洗烘",
|
||||||
|
"auto_dry": "自动烘干",
|
||||||
|
"fire_disinfect": "火焰消毒",
|
||||||
|
"toy_wash": "玩具洗"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"func_select": {
|
"func_select": {
|
||||||
"name": "功能选择"
|
"name": "功能选择"
|
||||||
@@ -570,7 +846,14 @@
|
|||||||
"name": "类型选择"
|
"name": "类型选择"
|
||||||
},
|
},
|
||||||
"work_status": {
|
"work_status": {
|
||||||
"name": "工作状态"
|
"name": "工作状态",
|
||||||
|
"state": {
|
||||||
|
"power_off": "关机",
|
||||||
|
"power_on": "开机",
|
||||||
|
"cancel": "取消",
|
||||||
|
"pause": "暂停",
|
||||||
|
"resume": "继续"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"voice": {
|
"voice": {
|
||||||
"name": "语音"
|
"name": "语音"
|
||||||
@@ -640,6 +923,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sensor": {
|
"sensor": {
|
||||||
|
"fresh_air_temp": {
|
||||||
|
"name": "新风温度"
|
||||||
|
},
|
||||||
"running_status": {
|
"running_status": {
|
||||||
"name": "运行状态"
|
"name": "运行状态"
|
||||||
},
|
},
|
||||||
@@ -685,6 +971,21 @@
|
|||||||
"auto_min_set_temp": {
|
"auto_min_set_temp": {
|
||||||
"name": "自动最小设定温度"
|
"name": "自动最小设定温度"
|
||||||
},
|
},
|
||||||
|
"b3_upstair_status": {
|
||||||
|
"name": "消毒柜状态"
|
||||||
|
},
|
||||||
|
"b7_left_status": {
|
||||||
|
"name": "左灶状态"
|
||||||
|
},
|
||||||
|
"b7_left_gear": {
|
||||||
|
"name": "左灶档位"
|
||||||
|
},
|
||||||
|
"b7_right_status": {
|
||||||
|
"name": "右灶状态"
|
||||||
|
},
|
||||||
|
"b7_right_gear": {
|
||||||
|
"name": "右灶档位"
|
||||||
|
},
|
||||||
"bath_out_volume": {
|
"bath_out_volume": {
|
||||||
"name": "浴缸出水量"
|
"name": "浴缸出水量"
|
||||||
},
|
},
|
||||||
@@ -1399,6 +1700,48 @@
|
|||||||
"ud_diy_up_percent": {
|
"ud_diy_up_percent": {
|
||||||
"name": "上下自定义上百分比"
|
"name": "上下自定义上百分比"
|
||||||
},
|
},
|
||||||
|
"heat_exchanger": {
|
||||||
|
"name": "采暖模式"
|
||||||
|
},
|
||||||
|
"fan_type": {
|
||||||
|
"name": "风机模式"
|
||||||
|
},
|
||||||
|
"ignitor_output": {
|
||||||
|
"name": "点火状态"
|
||||||
|
},
|
||||||
|
"fan_output": {
|
||||||
|
"name": "风机状态"
|
||||||
|
},
|
||||||
|
"current_heat_set_temperature": {
|
||||||
|
"name": "当前采暖设定温度"
|
||||||
|
},
|
||||||
|
"current_bath_set_temperature": {
|
||||||
|
"name": "当前生活热水设定温度"
|
||||||
|
},
|
||||||
|
"heat_out_water_temperature": {
|
||||||
|
"name": "采暖出水实际温度"
|
||||||
|
},
|
||||||
|
"bath_out_water_temperature": {
|
||||||
|
"name": "生活用水出水实际温度"
|
||||||
|
},
|
||||||
|
"water_gage": {
|
||||||
|
"name": "水压"
|
||||||
|
},
|
||||||
|
"in_tds": {
|
||||||
|
"name": "进水TDS"
|
||||||
|
},
|
||||||
|
"out_tds": {
|
||||||
|
"name": "出水TDS"
|
||||||
|
},
|
||||||
|
"life_1": {
|
||||||
|
"name": "RO滤芯寿命"
|
||||||
|
},
|
||||||
|
"life_2": {
|
||||||
|
"name": "MPC滤芯寿命"
|
||||||
|
},
|
||||||
|
"water_consumption": {
|
||||||
|
"name": "用水量"
|
||||||
|
},
|
||||||
"water_consumption_ml": {
|
"water_consumption_ml": {
|
||||||
"name": "用水量(毫升)"
|
"name": "用水量(毫升)"
|
||||||
},
|
},
|
||||||
@@ -1521,6 +1864,12 @@
|
|||||||
},
|
},
|
||||||
"heat_temp_set": {
|
"heat_temp_set": {
|
||||||
"name": "制热设定温度"
|
"name": "制热设定温度"
|
||||||
|
},
|
||||||
|
"tw1_in_water_temp": {
|
||||||
|
"name": "进水温度"
|
||||||
|
},
|
||||||
|
"tw1_out_water_temp": {
|
||||||
|
"name": "出水温度"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"light": {
|
"light": {
|
||||||
@@ -1584,8 +1933,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"switch": {
|
"switch": {
|
||||||
"follow_body_sense": {
|
"winter_mode": {
|
||||||
"name": "随身感"
|
"name": "冬季模式"
|
||||||
|
},
|
||||||
|
"summer_mode": {
|
||||||
|
"name": "夏季模式"
|
||||||
},
|
},
|
||||||
"waterions": {
|
"waterions": {
|
||||||
"name": "消杀"
|
"name": "消杀"
|
||||||
@@ -2480,7 +2832,19 @@
|
|||||||
},
|
},
|
||||||
"work_switch": {
|
"work_switch": {
|
||||||
"name": "工作开关"
|
"name": "工作开关"
|
||||||
|
},
|
||||||
|
"water_model_power_save": {
|
||||||
|
"name": "节能模式"
|
||||||
|
},
|
||||||
|
"water_model_go_out": {
|
||||||
|
"name": "外出模式"
|
||||||
|
},
|
||||||
|
"fastdhw_state": {
|
||||||
|
"name": "快速生活热水"
|
||||||
|
},
|
||||||
|
"forcetbh_state": {
|
||||||
|
"name": "强制待机"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user