海尔热水器除开关外其他功能无法使用
问题描述 海尔热水器里的功能只有开关可以使用,其他都不可以使用,显示集成“haier”不再提供此实体
环境信息:
- Homeassistant版本: [2025.5.1]
设备信息 Device 540853855CD7
错误日志 2025-05-17 22:35:30.618 WARNING (MainThread) [custom_components.haier.core.client] Device 540853648D0B cache is invalid 2025-05-17 22:35:30.629 ERROR (MainThread) [custom_components.haier.core.device] Haier device 540853648D0B init failed Traceback (most recent call last): File "/config/custom_components/haier/core/device.py", line 58, in async_init attributes = await self._client.get_digital_model_from_cache(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/haier/core/client.py", line 179, in get_digital_model_from_cache return cache['attributes'] ~~~~~^^^^^^^^^^^^^^ TypeError: string indices must be integers, not 'str' 2025-05-17 22:35:30.644 WARNING (MainThread) [custom_components.haier.core.client] Device 540853855CD7 cache is invalid 2025-05-17 22:35:30.646 ERROR (MainThread) [custom_components.haier.core.device] Haier device 540853855CD7 init failed Traceback (most recent call last): File "/config/custom_components/haier/core/device.py", line 58, in async_init attributes = await self._client.get_digital_model_from_cache(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/haier/core/client.py", line 179, in get_digital_model_from_cache return cache['attributes'] ~~~~~^^^^^^^^^^^^^^ TypeError: string indices must be integers, not 'str' 2025-05-17 22:35:30.660 WARNING (MainThread) [custom_components.haier.core.client] Device 540853A617A4 cache is invalid 2025-05-17 22:35:30.671 ERROR (MainThread) [custom_components.haier.core.device] Haier device 540853A617A4 init failed Traceback (most recent call last): File "/config/custom_components/haier/core/device.py", line 58, in async_init attributes = await self._client.get_digital_model_from_cache(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/haier/core/client.py", line 179, in get_digital_model_from_cache return cache['attributes'] ~~~~~^^^^^^^^^^^^^^ TypeError: string indices must be integers, not 'str'
请按issue模板中的步骤提供一下设备信息json
没有找到设备信息,有问题图片,已抓包更新账户信息但问题还在
设备信息 { "version": 1, "minor_version": 1, "key": "haier/device_540853A617A4.json", "data": { "device": { "name": "二楼电热水器", "type": "0601900B", "product_code": "GA0T06000", "product_name": "EC8001-PD3(U1)", "wifi_type": "201c120000118674061900418007514100000000000000000000000000000040" }, "attributes": [ { "desc": "查询所有属性", "invisible": true, "name": "getAllProperty", "operationType": "I", "readable": true, "valueRange": { "dataList": [ { "data": "getAllProperty" } ], "type": "LIST" }, "writable": true }, { "desc": "自动关机", "invisible": false, "name": "autoPowerOffStatus", "operationType": "I", "readable": true, "value": "true", "valueRange": { "dataList": [ { "data": "false", "desc": "关" }, { "data": "true", "desc": "开" } ], "type": "LIST" }, "writable": false }, { "desc": "当前温度", "invisible": false, "name": "currentTemperature", "readable": true, "value": "41", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "75", "minValue": "1", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "预约1时间小时", "invisible": false, "name": "resn1TimeHH", "operationType": "G", "readable": true, "value": "19", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "23", "minValue": "0", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "预约1时间分钟", "invisible": false, "name": "resn1TimeMM", "operationType": "G", "readable": true, "value": "0", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "59", "minValue": "0", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "保温/加热功能状态", "invisible": false, "name": "heatingStatus", "readable": true, "value": "1", "valueRange": { "dataList": [ { "data": "1", "desc": "保温" }, { "data": "2", "desc": "加热" } ], "type": "LIST" }, "writable": false }, { "desc": "剩余加热时间", "invisible": false, "name": "oddHeatTime", "readable": true, "value": "0", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "65535", "minValue": "0", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "停止报警", "invisible": true, "name": "stopCurrentAlarm", "operationType": "I", "readable": true, "valueRange": { "dataList": [ { "data": "stopCurrentAlarm" } ], "type": "LIST" }, "writable": true }, { "desc": "预约1启停", "invisible": false, "name": "resn1RunningStatus", "operationType": "G", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "false", "desc": "停止预约" }, { "data": "true", "desc": "启用预约" } ], "type": "LIST" }, "writable": false }, { "desc": "剩余热水量", "invisible": false, "name": "remainingHotWater", "readable": true, "value": "1", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "65535", "minValue": "0", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "抑菌模式", "invisible": false, "name": "sterilizationStatus", "operationType": "I", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "false", "desc": "关" }, { "data": "true", "desc": "开" } ], "type": "LIST" }, "writable": false }, { "desc": "中温保温功能状态", "invisible": false, "name": "heatKeepingStatus", "operationType": "I", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "false", "desc": "关" }, { "data": "true", "desc": "开" } ], "type": "LIST" }, "writable": false }, { "desc": "目标温度", "invisible": false, "name": "targetTemperature", "operationType": "I", "readable": true, "value": "41", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "75", "minValue": "35", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "动态增容", "invisible": false, "name": "dynamicExpansionStatus", "operationType": "I", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "false", "desc": "关" }, { "data": "true", "desc": "开" } ], "type": "LIST" }, "writable": false }, { "desc": "预约1循环", "invisible": false, "name": "resn1CycleStatus", "operationType": "G", "readable": true, "value": "true", "valueRange": { "dataList": [ { "data": "false", "desc": "执行一次" }, { "data": "true", "desc": "循环" } ], "type": "LIST" }, "writable": false }, { "desc": "查询报警", "invisible": true, "name": "getAllAlarm", "operationType": "I", "readable": true, "valueRange": { "dataList": [ { "data": "getAllAlarm" } ], "type": "LIST" }, "writable": true }, { "desc": "预约1温度", "invisible": false, "name": "resn1Temperature", "operationType": "G", "readable": true, "value": "75", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "75", "minValue": "35", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "设定时间", "invisible": false, "name": "time", "operationType": "I", "readable": true, "value": "15:55", "valueRange": { "dataTime": { "format": "HH:mm", "maxHour": 23, "maxMinute": 59, "maxSecond": 0, "minHour": 0, "minMinute": 0, "minSecond": 0 }, "type": "TIME" }, "writable": true }, { "desc": "抑菌提醒状态", "invisible": false, "name": "sterilizationRemindStatus", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "false", "desc": "关" }, { "data": "true", "desc": "开" } ], "type": "LIST" }, "writable": false }, { "desc": "开关机状态", "invisible": false, "name": "onOffStatus", "operationType": "IG", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "false", "desc": "关机" }, { "data": "true", "desc": "开机" } ], "type": "LIST" }, "writable": true } ] } } 已经找到对应文件,也删除后重新加载,但问题还在
删除haier/device_xxxxx.json文件,重启HA试试
删除
haier/device_xxxxx.json文件,重启HA试试
删掉以后重启问题还在
试试最新master分支代码呢
尝试最新的master分支代码呢
还是无法使用,实体只有一个开关可以用
同上,添加热水器后只有一个开关,其他均为传感器。
同
Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/config/custom_components/haier/core/client.py", line 254, in control_callback await self._send_command(ws, agClientId, e.data['deviceId'], e.data['attributes']) File "/config/custom_components/haier/core/client.py", line 390, in _send_command await ws.send_str(json.dumps({ ...<16 lines>... })) File "/usr/local/lib/python3.13/site-packages/aiohttp/client_ws.py", line 245, in send_str await self._writer.send_frame( data.encode("utf-8"), WSMsgType.TEXT, compress=compress ) File "/usr/local/lib/python3.13/site-packages/aiohttp/_websocket/writer.py", line 72, in send_frame raise ClientConnectionResetError("Cannot write to closing transport") aiohttp.client_exceptions.ClientConnectionResetError: Cannot write to closing transport
Detected that custom integration 'haier' sets option flow config_entry explicitly, which is deprecated at custom_components/haier/config_flow.py, line 68: self.config_entry = config_entry. This will stop working in Home Assistant 2025.12, please create a bug report at https://github.com/banto6/haier/issues
我的设备是
{ "version": 1, "minor_version": 1, "key": "haier/device_24E8CED86FF6.json", "data": { "device": { "name": "电热水器", "type": "0601206R", "product_code": "GA0SZD00G", "product_name": "EC5001-JH3U1", "wifi_type": "201c120000118674061200418011174200000000000000000000000000000040" }, "attributes": [ { "desc": "查询所有属性", "invisible": true, "name": "getAllProperty", "operationType": "I", "readable": true, "valueRange": { "dataList": [ { "data": "getAllProperty" } ], "type": "LIST" }, "writable": true }, { "desc": "自动关机", "invisible": false, "name": "autoPowerOffStatus", "operationType": "I", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "true", "desc": "开" }, { "data": "false", "desc": "关" } ], "type": "LIST" }, "writable": true }, { "desc": "当前温度", "invisible": false, "name": "currentTemperature", "readable": true, "value": "38", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "75", "minValue": "1", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "剩余加热时间", "invisible": false, "name": "oddHeatTime", "readable": true, "value": "3", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "65535", "minValue": "0", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "保温/加热功能状态", "invisible": false, "name": "heatingStatus", "readable": true, "value": "1", "valueRange": { "dataList": [ { "data": "1", "desc": "保温" }, { "data": "2", "desc": "加热" } ], "type": "LIST" }, "writable": false }, { "desc": "停止报警", "invisible": true, "name": "stopCurrentAlarm", "operationType": "I", "readable": true, "valueRange": { "dataList": [ { "data": "stopCurrentAlarm" } ], "type": "LIST" }, "writable": true }, { "desc": "内胆保养提醒开关状态", "invisible": false, "name": "tankReminderStatus", "operationType": "I", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "true", "desc": "开" }, { "data": "false", "desc": "关" } ], "type": "LIST" }, "writable": true }, { "desc": "剩余热水量", "invisible": false, "name": "remainingHotWater", "readable": true, "value": "25", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "255", "minValue": "0", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "抑菌模式", "invisible": false, "name": "sterilizationStatus", "operationType": "I", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "true", "desc": "开" }, { "data": "false", "desc": "关" } ], "type": "LIST" }, "writable": true }, { "desc": "中温保温功能状态", "invisible": false, "name": "heatKeepingStatus", "operationType": "I", "readable": true, "value": "true", "valueRange": { "dataList": [ { "data": "true", "desc": "开" }, { "data": "false", "desc": "关" } ], "type": "LIST" }, "writable": true }, { "desc": "目标温度", "invisible": false, "name": "targetTemperature", "operationType": "I", "readable": true, "value": "40", "valueRange": { "dataStep": { "dataType": "Integer", "maxValue": "75", "minValue": "35", "step": "1" }, "type": "STEP" }, "writable": false }, { "desc": "动态增容", "invisible": false, "name": "dynamicExpansionStatus", "operationType": "I", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "true", "desc": "开" }, { "data": "false", "desc": "关" } ], "type": "LIST" }, "writable": true }, { "desc": "查询所有报警", "invisible": true, "name": "getAllAlarm", "operationType": "I", "readable": true, "valueRange": { "dataList": [ { "data": "getAllAlarm" } ], "type": "LIST" }, "writable": true }, { "desc": "设定时间", "invisible": false, "name": "time", "operationType": "I", "readable": true, "value": "11:52", "valueRange": { "dataTime": { "format": "HH:mm", "maxHour": 23, "maxMinute": 59, "maxSecond": 0, "minHour": 0, "minMinute": 0, "minSecond": 0 }, "type": "TIME" }, "writable": true }, { "desc": "设置保养模式", "invisible": false, "name": "setMaintenance", "operationType": "I", "readable": false, "valueRange": { "dataList": [ { "data": "1", "desc": "阳极保养" }, { "data": "2", "desc": "内胆保养" }, { "data": "3", "desc": "内胆+阳极保养" } ], "type": "LIST" }, "writable": true }, { "desc": "抑菌提醒状态", "invisible": false, "name": "sterilizationRemindStatus", "readable": true, "value": "false", "valueRange": { "dataList": [ { "data": "true", "desc": "开" }, { "data": "false", "desc": "关" } ], "type": "LIST" }, "writable": false }, { "defaultValue": "true", "desc": "开关机状态", "invisible": false, "name": "onOffStatus", "operationType": "IG", "readable": true, "value": "true", "valueRange": { "dataList": [ { "data": "true", "desc": "开机" }, { "data": "false", "desc": "关机" } ], "type": "LIST" }, "writable": true } ] } }
@Resurrection2981 你这个不是正常的吗?
@Resurrection2981
远端返回的不支持调整温度,暂时无解