midea-ac-lan.zip
立即下载
资源介绍:
美的的HAAS插件,可实现基于HAAS控制美的智能设备
将最新版本中的所有 custom_components/midea_ac_lan 文件复制到您的 /custom_components/midea_ac_lan Home Assistant。,最后重启HA
添加配置过程中,系统可能会要求您输入美的帐户和密码。必须从美的云服务器检索设备信息(Token 和 Key)。配置完所有设备后,您可以删除美的账户配置,而不会影响设备的使用
from homeassistant.const import (
Platform,
TIME_DAYS,
TIME_HOURS,
TIME_MINUTES,
TIME_SECONDS,
TEMP_CELSIUS,
POWER_WATT,
PERCENTAGE,
VOLUME_LITERS,
ENERGY_KILO_WATT_HOUR,
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_MILLION
)
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from .midea.devices.x26.device import DeviceAttributes as X26Attributes
from .midea.devices.x34.device import DeviceAttributes as X34Attributes
from .midea.devices.x40.device import DeviceAttributes as X40Attributes
from .midea.devices.a1.device import DeviceAttributes as A1Attributes
from .midea.devices.ac.device import DeviceAttributes as ACAttributes
from .midea.devices.b0.device import DeviceAttributes as B0Attributes
from .midea.devices.b1.device import DeviceAttributes as B1Attributes
from .midea.devices.b3.device import DeviceAttributes as B3Attributes
from .midea.devices.b4.device import DeviceAttributes as B4Attributes
from .midea.devices.b6.device import DeviceAttributes as B6Attributes
from .midea.devices.bf.device import DeviceAttributes as BFAttributes
from .midea.devices.c2.device import DeviceAttributes as C2Attributes
from .midea.devices.c3.device import DeviceAttributes as C3Attributes
from .midea.devices.ca.device import DeviceAttributes as CAAttributes
from .midea.devices.cc.device import DeviceAttributes as CCAttributes
from .midea.devices.cd.device import DeviceAttributes as CDAttributes
from .midea.devices.ce.device import DeviceAttributes as CEAttributes
from .midea.devices.cf.device import DeviceAttributes as CFAttributes
from .midea.devices.da.device import DeviceAttributes as DAAttributes
from .midea.devices.db.device import DeviceAttributes as DBAttributes
from .midea.devices.dc.device import DeviceAttributes as DCAttributes
from .midea.devices.e1.device import DeviceAttributes as E1Attributes
from .midea.devices.e2.device import DeviceAttributes as E2Attributes
from .midea.devices.e3.device import DeviceAttributes as E3Attributes
from .midea.devices.e6.device import DeviceAttributes as E6Attributes
from .midea.devices.e8.device import DeviceAttributes as E8Attributes
from .midea.devices.ea.device import DeviceAttributes as EAAttributes
from .midea.devices.ec.device import DeviceAttributes as ECAttributes
from .midea.devices.ed.device import DeviceAttributes as EDAttributes
from .midea.devices.fa.device import DeviceAttributes as FAAttributes
from .midea.devices.fb.device import DeviceAttributes as FBAttributes
from .midea.devices.fc.device import DeviceAttributes as FCAttributes
from .midea.devices.fd.device import DeviceAttributes as FDAttributes
MIDEA_DEVICES = {
0x13: {
"name": "Light",
"entities": {
"light": {
"type": Platform.LIGHT,
"icon": "mdi:lightbulb",
"default": True
}
}
},
0x26: {
"name": "Bathroom Master",
"entities": {
X26Attributes.current_temperature: {
"type": Platform.SENSOR,
"name": "Current Temperature",
"device_class": SensorDeviceClass.TEMPERATURE,
"unit": TEMP_CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
X26Attributes.current_humidity: {
"type": Platform.SENSOR,
"name": "Current Humidity",
"device_class": SensorDeviceClass.HUMIDITY,
"unit": PERCENTAGE,
"state_class": SensorStateClass.MEASUREMENT
},
X26Attributes.current_radar: {
"type": Platform.BINARY_SENSOR,
"name": "Occupancy Status",
"device_class": BinarySensorDeviceClass.MOVING
},
X26Attributes.main_light: {
"type": Platform.SWITCH,
"name": "Main Light",
"icon": "mdi:lightbulb"
},
X26Attributes.night_light: {
"type": Platform.SWITCH,
"name": "Night Light",
"icon": "mdi:lightbulb"
},
X26Attributes.mode: {
"type": Platform.SELECT,
"name": "Mode",
"options": "preset_modes",
"icon": "mdi:fan"
},
X26Attributes.direction: {
"type": Platform.SELECT,
"name": "Direction",
"options": "directions",
"icon": "mdi:arrow-split-vertical"
}
}
},
0x34: {
"name": "Sink Dishwasher",
"entities": {
X34Attributes.door: {
"type": Platform.BINARY_SENSOR,
"name": "Door",
"icon": "mdi:box-shadow",
"device_class": BinarySensorDeviceClass.DOOR
},
X34Attributes.rinse_aid: {
"type": Platform.BINARY_SENSOR,
"name": "Rinse Aid Shortage",
"icon": "mdi:bottle-tonic",
"device_class": BinarySensorDeviceClass.PROBLEM
},
X34Attributes.salt: {
"type": Platform.BINARY_SENSOR,
"name": "Salt Shortage",
"icon": "mdi:drag",
"device_class": BinarySensorDeviceClass.PROBLEM
},
X34Attributes.humidity: {
"type": Platform.SENSOR,
"name": "Humidity",
"device_class": SensorDeviceClass.HUMIDITY,
"unit": PERCENTAGE,
"state_class": SensorStateClass.MEASUREMENT
},
X34Attributes.progress: {
"type": Platform.SENSOR,
"name": "Progress",
"icon": "mdi:rotate-360"
},
X34Attributes.status: {
"type": Platform.SENSOR,
"name": "Status",
"icon": "mdi:information"
},
X34Attributes.storage_remaining: {
"type": Platform.SENSOR,
"name": "Storage Remaining",
"icon": "mdi:progress-clock",
"unit": TIME_HOURS,
"state_class": SensorStateClass.MEASUREMENT
},
X34Attributes.temperature: {
"type": Platform.SENSOR,
"name": "Temperature",
"device_class": SensorDeviceClass.TEMPERATURE,
"unit": TEMP_CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
},
X34Attributes.time_remaining: {
"type": Platform.SENSOR,
"name": "Time Remaining",
"icon": "mdi:progress-clock",
"unit": TIME_MINUTES,
"state_class": SensorStateClass.MEASUREMENT
},
X34Attributes.child_lock: {
"type": Platform.LOCK,
"name": "Child Lock"
},
X34Attributes.power: {
"type": Platform.SWITCH,
"name": "Power",
"icon": "mdi:power"
},
X34Attributes.storage: {
"type": Platform.SWITCH,
"name": "Storage",
"icon": "mdi:repeat-variant"
},
X34Attributes.mode: {
"type": Platform.SENSOR,
"name": "Working Mode",
"icon": "mdi:dishwasher"
},
X34Attributes.error_code: {
"type": Platform.SENSOR,
"name": "Error Code",
"icon": "mdi:alert-box"
},
资源文件列表:
midea_ac_lan.zip 大约有141个文件