al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.65k stars 664 forks source link

米家新风机自定义添加实体无效 #1965

Open hktkzyx opened 2 days ago

hktkzyx commented 2 days ago

Device model / 设备型号

dmaker.airfresh.t2017

Component version / 插件版本

0.7.23

HA core version / HA版本

2024.10.4

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

添加该设备后默认只能调整开关和模式 image

但是我想添加辅热开关和辅热的等级,添加后虽然成功添加了实体,但实体控制不生效

  fan.dmaker_t2017_0613_air_fresh:
    switch_properties: heater
    select_properties: heat_level
    auto_cloud: true
    miot_local: true

image

Entity attributes / 实体属性

preset_modes: Auto, Sleep, Favorite
preset_mode: Favorite
model: dmaker.airfresh.t2017
lan_ip: 192.168.31.178
mac_address: C8:5C:CC:70:06:13
entity_class: MiotFanEntity
home_room: 野人家 衣帽间
miot_type: urn:miot-spec-v2:device:air-fresh:0000A012:dmaker-t2017:2
air_fresh.on: true
air_fresh.mode: 2
air_fresh.heater: true
air_fresh.heat_level: 2
alarm: true
screen.on: true
air_fresh_favorite.fan_level: 12
physical_controls_locked: false
filter-5.filter_life_level: 64
filter-5.filter_left_time: 115
filter.filter_life_level: 27
filter.filter_left_time: 24
environment.pm2_5_density: 0
environment.temperature: 18
environment.co2_density: 450
state_updater: lan
friendly_name: 新风机 Air Fresh
supported_features: 56
air_fresh.on.error: -4004 Other internal errors
air_fresh.mode.error: -4004 Other internal errors
air_fresh.heater.error: -4004 Other internal errors
air_fresh.heat_level.error: -4004 Other internal errors
alarm.error: -4004 Other internal errors
screen.on.error: -4004 Other internal errors
air_fresh_favorite.fan_level.error: -4004 Other internal errors
physical_controls_locked.error: -4004 Other internal errors
filter-5.filter_life_level.error: -4004 Other internal errors
filter-5.filter_left_time.error: -4004 Other internal errors
filter.filter_life_level.error: -4004 Other internal errors
filter.filter_left_time.error: -4004 Other internal errors
environment.pm2_5_density.error: -4004 Other internal errors
environment.temperature.error: -4004 Other internal errors
environment.co2_density.error: -4004 Other internal errors
sub_entities: air_fresh-2.heater-3, air_fresh-2.heat_level-4, environment-3.pm2_5_density-1, environment-3.temperature-2, environment-3.co2_density-3, filter-4.filter_life_level-1, filter-4.filter_left_time-2, filter-5.filter_life_level-1, filter-5.filter_left_time-2, physical_controls_locked-6.physical_controls_locked-1

Home Assistant Logs / 系统日志

此错误来自自定义集成。

日志记录器: custom_components.xiaomi_miot.fan 来源: custom_components/xiaomi_miot/init.py:1915 集成: Xiaomi Miot Auto (文档, 问题) 首次出现: 21:37:32 (5 次总计出现) 上次记录: 21:39:37

新风机(dmaker.airfresh.t2017): Set miot property {'did': '684727945', 'siid': 2, 'piid': 3, 'value': False} failed: Unable to recover failed command 新风机(dmaker.airfresh.t2017): Set miot property {'did': '684727945', 'siid': 2, 'piid': 1, 'value': False} failed: Unable to recover failed command 新风机(dmaker.airfresh.t2017): Set miot property {'did': '684727945', 'siid': 2, 'piid': 4, 'value': 1} failed: Unable to recover failed command 新风机(dmaker.airfresh.t2017): Set miot property {'did': '684727945', 'siid': 2, 'piid': 1, 'value': False} failed: No response from the device

al-one commented 1 day ago

尝试master分支。

wget -O - https://get.hacs.vip | DOMAIN=xiaomi_miot ARCHIVE_TAG=master bash -