GithubHelp home page GithubHelp logo

haier's People

Contributors

banto6 avatar cairy avatar lightrabbit avatar necroneco avatar pangjian avatar phoenixemik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

haier's Issues

刚才更新了下,空调的climate实体没了

风管机,设备信息如下
Device Info: {'_raw_data': {'deviceId': '18A7F198C686', 'deviceName': '**空调', 'deviceType': '0D012001', 'online': True, 'permissions': [{'auth': {'control': True, 'set': True, 'view': True}, 'authType': 'owner'}], 'productCodeT': 'AA9KK9007', 'productNameT': 'KFRD-72NW/64DDA21Z', 'totalPermission': {'control': True, 'set': True, 'view': True}, 'wifiType': '201c1200240008100d12f71c4094f300000080e384181627a2904f4940b24240'}}

另外设备的开关可以启动空调,但是climate面板无法启动空调。

筛选实体的时候报错,无法筛选

问题描述
更新插件后发现多了实体筛选的功能,于是对非空调所需实体进行include筛选,结果提交的时候就会报错

环境信息:

  • Homeassistant版本: [2023.7.1]

日志信息
此错误来自自定义集成。

Logger: aiohttp.server
Source: custom_components/haier/core/config.py:132
Integration: Haier (documentation, issues)
First occurred: 19:15:04 (3 occurrences)
Last logged: 19:15:06

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 242, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 297, in async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 393, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/config_flow.py", line 176, in async_step_entity_filter
cfg.set_target_entities(user_input['device_id'], user_input['target_entities'])
File "/config/custom_components/haier/core/config.py", line 132, in set_target_entities
raise ValueError()
ValueError

海尔空调的Climate (Beta)模块的疑问

Climate (Beta)海尔空调,每次通过语音启动海尔空调都是自动,现在是2023年8月,空调被设置成制热启动,是否可以可以修改一下,变成按照空调的上一次启动状态启动,就是打开开关机的,不进行调节,因为现在的海尔空调如果通过遥控器或者海尔app启动,都是能够按照上一次的状态运行,(温度,模式等等)。 我家用的是小米音响通过hasslife这个插件语音控制的

更新0.1.0版本之后所有实体都不可用

问题描述
更新之后所有实体变为不可用,日志有多条报错。
家里有两台海尔的空调,一台卡萨帝冰箱和一台卡萨帝洗衣机,目前只有两个空调能正常识别。0.1.0之前的版本空调可以正常控制。
另外想请问大佬是否有计划把空调设备内的实体整合为HA的climate实体?感谢大佬!

环境信息:

  • Homeassistant版本: 2023.7.1

日志信息

Logger: homeassistant.components.switch
Source: custom_components/haier/__init__.py:146
Integration: 开关 ([documentation](https://www.home-assistant.io/integrations/switch), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+switch%22))
First occurred: 10:38:03 (1 occurrences)
Last logged: 10:38:03

Error while setting up haier platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 353, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/haier/switch.py", line 20, in async_setup_entry
    await async_register_entity(hass, entry, async_add_entities, register, 'switch')
  File "/config/custom_components/haier/__init__.py", line 146, in async_register_entity
    if cfg[CONF_FILTER_TYPE] == 'exclude' and spec['key'] in cfg[CONF_TARGET_ENTITIES]:
       ~~~^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Logger: homeassistant.components.binary_sensor
Source: custom_components/haier/__init__.py:146
Integration: 二元传感器 ([documentation](https://www.home-assistant.io/integrations/binary_sensor), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+binary_sensor%22))
First occurred: 10:38:03 (1 occurrences)
Last logged: 10:38:03

Error while setting up haier platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 353, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/haier/binary_sensor.py", line 19, in async_setup_entry
    await async_register_entity(hass, entry, async_add_entities, register, 'binary_sensors')
  File "/config/custom_components/haier/__init__.py", line 146, in async_register_entity
    if cfg[CONF_FILTER_TYPE] == 'exclude' and spec['key'] in cfg[CONF_TARGET_ENTITIES]:
       ~~~^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Logger: homeassistant.components.number
Source: custom_components/haier/__init__.py:146
Integration: 数值输入器 ([documentation](https://www.home-assistant.io/integrations/number), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+number%22))
First occurred: 10:38:03 (1 occurrences)
Last logged: 10:38:03

Error while setting up haier platform for number
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 353, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/haier/number.py", line 18, in async_setup_entry
    await async_register_entity(hass, entry, async_add_entities, register, 'numbers')
  File "/config/custom_components/haier/__init__.py", line 146, in async_register_entity
    if cfg[CONF_FILTER_TYPE] == 'exclude' and spec['key'] in cfg[CONF_TARGET_ENTITIES]:
       ~~~^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Logger: homeassistant.components.select
Source: custom_components/haier/__init__.py:146
Integration: 选择器 ([documentation](https://www.home-assistant.io/integrations/select), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+select%22))
First occurred: 10:38:03 (1 occurrences)
Last logged: 10:38:03

Error while setting up haier platform for select
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 353, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/haier/select.py", line 18, in async_setup_entry
    await async_register_entity(hass, entry, async_add_entities, register, 'selects')
  File "/config/custom_components/haier/__init__.py", line 146, in async_register_entity
    if cfg[CONF_FILTER_TYPE] == 'exclude' and spec['key'] in cfg[CONF_TARGET_ENTITIES]:
       ~~~^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Logger: custom_components.haier
Source: custom_components/haier/haier.py:181
Integration: Haier ([documentation](https://github.com/banto6/haier), [issues](https://github.com/banto6/haier/issues))
First occurred: 10:38:01 (2 occurrences)
Last logged: 10:38:03

设备[04FA83FA81E5]初始化失败
设备[DC330D6383E7]初始化失败
Traceback (most recent call last):
  File "/config/custom_components/haier/__init__.py", line 42, in async_setup_entry
    specs = await client.get_hardware_config(device.wifi_type)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/haier/haier.py", line 181, in get_hardware_config
    raise HaierClientException('获取配置文件失败')
custom_components.haier.haier.HaierClientException: 获取配置文件失败
Logger: custom_components.haier.haier
Source: custom_components/haier/haier.py:179
Integration: Haier ([documentation](https://github.com/banto6/haier), [issues](https://github.com/banto6/haier/issues))
First occurred: 10:38:01 (2 occurrences)
Last logged: 10:38:03

获取配置信息失败, wifi_type: 111c120024000810040100318001150000000000000000000000000000000000, response: {"status": "1", "data": null, "total": 0}
获取配置信息失败, wifi_type: 111c120024000810010200618003654100000000000061800376410000010000, response: {"status": "1", "data": null, "total": 0}

[climate][bug]无法开关机

问题描述

  1. 使用Homekit(iPhone家庭APP)操作开机关机,无法开关机
  2. 使用遥控开机,再使用HomeKit开关机,无法开关机, 但是可以制热制冷, 可以调温
  3. 另外好像(iPhone家庭APP重) 摇摆 和 风扇模式 是反的

环境信息:

  • Homeassistant版本: [e.g. 2023.7.3]

设备信息
若是设备无法识别或控制错误则此项必填

以下信息开启debug模式后可在Device Info部分的日志中找到。日志可在配置 > 系统 > 日志 > 加载完整日志中查看。

{'_raw_data': {'deviceId': 'A082225A9404', 'deviceName': '儿童房空调', 'deviceType': '02012036', 'online': True, 'permissions': [{'auth': {'control': True, 'set': False, 'view': True}, 'authType': 'home'}], 'productCodeT': 'AAABTT00M', 'productNameT': 'KFR-26G/KBB81U1室内机总成', 'totalPermission': {'control': True, 'set': False, 'view': True}, 'wifiType': '2008610800820324021200118006915900000000000000000000000000000040'}}

错误日志

此错误来自自定义集成。

Logger: homeassistant.core
Source: custom_components/haier/climate.py:108
Integration: Haier (documentation, issues)
First occurred: 22:42:27 (2 occurrences)
Last logged: 22:43:08

Error executing service: <ServiceCall climate.set_hvac_mode (c:01H5WEDVH6VCR6ZWJYYRYJGEZN): entity_id=['climate.a082225a9404_climate'], hvac_mode=off>
Error executing service: <ServiceCall climate.set_hvac_mode (c:01H5WEF3XWBF8CSWCEW03RYYXX): entity_id=['climate.a082225a9404_climate'], hvac_mode=off>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1983, in catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 2005, in _execute_service
return await cast(
^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 848, in entity_service_call
response_data = task.result() # pop exception if have
^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 497, in async_set_hvac_mode
await self.hass.async_add_executor_job(self.set_hvac_mode, hvac_mode)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/climate.py", line 108, in set_hvac_mode
'operationMode': {
^
KeyError: <HVACMode.OFF: 'off'>

登陆认证失败

问题描述
我昨天刚下载好插件也安装好了,在进入第一步登陆认证的时候出现认证失败这种信息,我确认过海尔智家的账号密码没有错误。

空调设备信息收集

背景

目前计划整合climate实体,需要尽可能多的空调配置文件以供评估实现的可能性。

数据收集

需要的信息如下,可在Device Info部分的日志中找到。日志可在配置 > 系统 > 日志 > 加载完整日志中查看。

Device Info日志需要使用master分支代码或者v0.1.0开启debug模式才会显示。

deviceType:

productCodeT:

productNameT:

wifiType:

请不会在此issue下回复无关信息,无关信息会直接隐藏。

目前Climate已推出Beta版。因为我没有海尔空调设备,所以无法测试。欢迎大家参与测试。

测试过程中遇到的问题欢迎提issue

海尔冰箱添加不了

此错误来自自定义集成。

Logger: custom_components.haier
Source: custom_components/haier/haier.py:181
Integration: Haier (documentation, issues)
First occurred: 10:32:44 (3 occurrences)
Last logged: 10:34:13

设备[DC330D4F52AE]初始化失败
Traceback (most recent call last):
File "/config/custom_components/haier/init.py", line 43, in async_setup_entry
specs = await client.get_hardware_config(device.wifi_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/haier.py", line 181, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.haier.HaierClientException: 获取配置文件失败

请问大神能否将海尔空调的设定温度和模式控制做下改进呢?

首先非常感谢大神的付出,写出这个集成,已经解决了很大的问题,只是目前我个人使用下来,还是有些不是那么完美。请问大神能否将海尔空调的设定温度和模式做成面板类型的呢,目前这个用起来一大个版面, 在homeassistant里美观度远不如其他的集成,而且也不便于操作。另外是否有办法可以将设定温度和模式这些添加到巴法云里去操作呢。 再次感谢大神的工作! 已经在github 关注。

[BUG] 冰箱冷藏室温度值不合理

问题描述
冰箱温度不在合理范围内

环境信息:

  • Homeassistant版本: 2023.7.1

设备信息
若是设备无法识别或控制错误则此项必填

以下信息开启debug模式后可在Device Info部分的日志中找到。日志可在配置 > 系统 > 日志 > 加载完整日志中查看。

deviceType: 0102400I
productCodeT: BC11F4000
productNameT: BCD-406WLLTD5DS9U1
wifiType: 200861051c408504012400618003475400000000000061800312520000000040

错误日志
image
如图,冷藏室显示温度为43度,不在显示合理范围内。

日志

2023-07-18 11:20:27.837 DEBUG (MainThread) [custom_components.haier] 共获取到1个设备
2023-07-18 11:20:27.837 DEBUG (MainThread) [custom_components.haier] 未配置设备过滤规则
2023-07-18 11:20:27.837 DEBUG (MainThread) [custom_components.haier] 经过过滤后共获取到1个设备
2023-07-18 11:20:27.837 DEBUG (MainThread) [custom_components.haier] Device Info: {'_raw_data': {'deviceId': 'AC8226971E42', 'deviceName': '冰箱', 'deviceType': '0102400I', 'online': True, 'permissions': [{'auth': {'control': True, 'set': True, 'view': True}, 'authType': 'owner'}], 'productCodeT': 'BC11F4000', 'productNameT': 'BCD-406WLLTD5DS9U1', 'totalPermission': {'control': True, 'set': True, 'view': True}, 'wifiType': '200861051c408504012400618003475400000000000061800312520000000040'}}
2023-07-18 11:20:30.907 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[AC8226971E42]已获取到最新状态数据: {"freezerTemperatureC": "-18", "envTemperature": "32", "refrigeratorDoorStatus": "false", "intelligenceMode": "false", "envHumidity": "70", "quickFreezingMode": "false", "quickRefrigeratingMode": "false", "showStatus": "false", "freezerTargetTempLevel": "12", "refrigeratorTargetTempLevel": "6", "refrigeratorTemperatureC": "43"}

海尔JSQ31-16KN5致远U1燃气热水器接入后只有传感器,无开关

问题描述
海尔JSQ31-16KN5致远U1燃气热水器接入后只有传感器,无开关什么的,请帮忙看看

环境信息:

  • Homeassistant版本:2023.8.1

设备信息
海尔JSQ31-16KN5致远U1燃气热水器

以下信息开启debug模式后可在Device Info部分的日志中找到。日志可在配置 > 系统 > 日志 > 加载完整日志中查看。

deviceType:
productCodeT:
productNameT:
wifiType:

错误日志
home-assistant_2023-08-10T05-13-09.214Z.log

添加集成后不显示设备或实体

问题描述
添加集成后不显示设备或实体

环境信息:
Home Assistant 2023.6.2

设备信息
海尔空调KFR-35G/GAA23AU1

deviceType:
productCodeT:
productNameT:
wifiType:00000000000000008080000000041410

错误日志
2023-07-20 16:50:04.645 ERROR (MainThread) [custom_components.haier.core.client] 获取配置信息失败, wifi_type: 00000000000000008080000000041410, response: {"status": "1", "data": null, "total": 0}
2023-07-20 16:50:04.646 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
Traceback (most recent call last):
File "/config/custom_components/haier/core/device.py", line 69, in async_init
properties = (await self._client.get_hardware_config(self.wifi_type))['Property']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/core/client.py", line 153, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.core.client.HaierClientException: 获取配置文件失败
2023-07-20 16:50:05.134 ERROR (MainThread) [custom_components.haier.core.client] 获取配置信息失败, wifi_type: 111c120024000810010400618003474300000000000061800312430000000000, response: {"status": "1", "data": null, "total": 0}
2023-07-20 16:50:05.135 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
Traceback (most recent call last):
File "/config/custom_components/haier/core/device.py", line 69, in async_init
properties = (await self._client.get_hardware_config(self.wifi_type))['Property']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/core/client.py", line 153, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.core.client.HaierClientException: 获取配置文件失败
2023-07-20 16:50:05.651 ERROR (MainThread) [custom_components.haier.core.client] 获取配置信息失败, wifi_type: 00000000000000008080000000041410, response: {"status": "1", "data": null, "total": 0}
2023-07-20 16:50:05.652 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
Traceback (most recent call last):
File "/config/custom_components/haier/core/device.py", line 69, in async_init
properties = (await self._client.get_hardware_config(self.wifi_type))['Property']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/core/client.py", line 153, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.core.client.HaierClientException: 获取配置文件失败
2023-07-20 16:50:05.653 ERROR (MainThread) [custom_components.haier] Device [04FA83174579] 未获取到可用attribute
2023-07-20 16:50:05.653 ERROR (MainThread) [custom_components.haier] Device [DC330DCD3EC7] 未获取到可用attribute
2023-07-20 16:50:05.654 ERROR (MainThread) [custom_components.haier] Device [04FA83829220] 未获取到可用attribute
2023-07-20 16:50:05.654 DEBUG (MainThread) [custom_components.haier] 共获取到0个设备

[建议]

海尔空调设备加载到 Homekit之后 ,Iphone 家庭里的 空调控制能否做成下面这种类型
IMG_3114

洗衣机/洗护设备“提示信息”“洗涤阶段”传感器不可用

如题,更新了前几天的代码,发现海尔集成洗衣机设备下的“提示信息”“洗涤阶段”两个传感器变成“不可用”状态,不知道大侠能不能把这两个传感器恢复。对于我来说,这两个传感器提供的信息便于掌握设备运转过程,在自动化里采用相应代码给予提示或操作,比较实用。

海尔立式空调无法接入 型号:KFR-72L/GCB81U1室内机总成

家里有四台海尔空调,有三台挂式空调可以接入,但客厅的海尔立式空调无法接入,型号为:KFR-72L/GCB81U1室内机总成。
另外空调climate卡片温度显示有问题,目标温度设定只显示0-15度(实际对应16-31度),室内环境温度实际为27度时,climate卡片显示温度为54度,建议优化。

无法添加进homekit

在homessistant里可正确识别并且控制,但homekit识别不到,请求大佬解答。

冰箱接入报错

问题描述
感谢分享!我添加冰箱,设备筛选方式无反应,实体筛选报“Unknown error occurred”错误

环境信息:

  • Homeassistant版本: [e.g. 2023.7.1]

日志信息
Logger: custom_components.haier.haier
Source: custom_components/haier/haier.py:179
Integration: Haier (documentation, issues)
First occurred: 12:17:34 (1 occurrences)
Last logged: 12:17:34

获取配置信息失败, wifi_type: 111c120024000810010400618003474300000000000061800312430000000000, response: {"status": "1", "data": null, "total": 0}

Logger: custom_components.haier
Source: custom_components/haier/haier.py:181
Integration: Haier (documentation, issues)
First occurred: 12:17:34 (1 occurrences)
Last logged: 12:17:34

设备[DC330DB0D991]初始化失败
Traceback (most recent call last):
File "/config/custom_components/haier/init.py", line 43, in async_setup_entry
specs = await client.get_hardware_config(device.wifi_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/haier.py", line 181, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.haier.HaierClientException: 获取配置文件失败

[BUG]

问题描述
无法添加集成

环境信息:

Home Assistant 2023.1.7
前端版本: 20230110.0 - latest

添加集成时提示
无法加载配置向导: {"message":"Invalid handler specified"}

[BUG]

卡萨帝空调无法接入,只显示有设备和几个好像是音响才有的实体(音量、ota这些),别的都不行

  • Homeassistant版本: [e.g. 2023.7.2]
    deviceType:02012036
    productCodeT:AABMZD000
    productNameT:CAS35GCA(81)U1室内机总成
    wifiType:2008610800820324021200118006915900000000000000000000000000000040
    错误日志
    2023-07-15 00:57:55.728 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
    Traceback (most recent call last):
    File "/config/custom_components/haier/core/device.py", line 70, in async_init
    self._attributes.append(parser.parse_attribute(item))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 68, in parse_attribute
    return self._parse_as_sensor(attribute)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 102, in _parse_as_sensor
    if 'unit' in attribute['variants']:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: argument of type 'NoneType' is not iterable
    2023-07-15 00:57:56.894 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
    Traceback (most recent call last):
    File "/config/custom_components/haier/core/device.py", line 70, in async_init
    self._attributes.append(parser.parse_attribute(item))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 68, in parse_attribute
    return self._parse_as_sensor(attribute)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 102, in _parse_as_sensor
    if 'unit' in attribute['variants']:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: argument of type 'NoneType' is not iterable
    2023-07-15 00:58:00.658 WARNING (MainThread) [homeassistant.components.kodi.media_player] Unable to connect to Kodi via websocket
    2023-07-15 01:11:36.420 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
    Traceback (most recent call last):
    File "/config/custom_components/haier/core/device.py", line 70, in async_init
    self._attributes.append(parser.parse_attribute(item))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 68, in parse_attribute
    return self._parse_as_sensor(attribute)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 102, in _parse_as_sensor
    if 'unit' in attribute['variants']:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: argument of type 'NoneType' is not iterable
    2023-07-15 01:11:36.872 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
    Traceback (most recent call last):
    File "/config/custom_components/haier/core/device.py", line 70, in async_init
    self._attributes.append(parser.parse_attribute(item))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 68, in parse_attribute
    return self._parse_as_sensor(attribute)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 102, in _parse_as_sensor
    if 'unit' in attribute['variants']:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: argument of type 'NoneType' is not iterable
    2023-07-15 01:12:06.115 DEBUG (MainThread) [custom_components.haier] reload.....
    2023-07-15 01:12:07.089 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
    Traceback (most recent call last):
    File "/config/custom_components/haier/core/device.py", line 70, in async_init
    self._attributes.append(parser.parse_attribute(item))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 68, in parse_attribute
    return self._parse_as_sensor(attribute)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 102, in _parse_as_sensor
    if 'unit' in attribute['variants']:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: argument of type 'NoneType' is not iterable
    2023-07-15 01:12:07.563 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
    Traceback (most recent call last):
    File "/config/custom_components/haier/core/device.py", line 70, in async_init
    self._attributes.append(parser.parse_attribute(item))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 68, in parse_attribute
    return self._parse_as_sensor(attribute)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/config/custom_components/haier/core/attribute.py", line 102, in _parse_as_sensor
    if 'unit' in attribute['variants']:
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: argument of type 'NoneType' is not iterable
    2023-07-15 01:12:07.564 DEBUG (MainThread) [custom_components.haier] 共获取到2个设备
    2023-07-15 01:12:07.736 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[04E2290EXXXX]已获取到最新状态数据: {"windSensingStatus": "false", "silentSleepStatus": "false", "humidificationStatus": "false", "intelligenceStatus": "false", "location": "", "messageVersion": "", "pm2p5ExceedRemind": "0", "electricHeatingStatus": "false", "ch2oValue": "0", "rapidMode": "false", "voiceSignStatus": "false", "specialMode": "0", "energySavePeriod": "15", "10degreeHeatingStatus": "false", "time": "00:00:00", "ch2oCleaningStatus": "false", "humanSensingStatus": "0", "outdoorPM2p5Value": "0", "scheduleVersion": "", "acType": "0", "playControl": "0", "lightStatus": "false", "dialect": "0", "totalCleaningTime": "0", "updateStatus": "false", "authVersion": "0", "errCode": "0", "totalElectricityUsed": "0", "tempUnit": "1", "sensingResult": "0", "currentMediaName": "", "lockStatus": "false", "clientId": "", "playProgress": "0", "selfCleaningStatus": "false", "runningMode": "1", "airQuality": "0", "playTime": "0", "operationModeHK": "0", "hardVersion": "", "voiceStatus": "false", "operationMode": "1", "playStatus": "false", "co2Value": "0", "targetTemperature": "27.00", "vocValue": "0", "energySavingStatus": "false", "localFilterChangeFlag": "false", "freshAirStatus": "false", "onOffStatus": "false", "windDirectionVertical": "5", "halfDegreeSettingStatus": "false", "date": "00:00:00", "echoStatus": "false", "freshWindSpeed": "0", "outdoorTemperature": "29.00", "uniqueId": "", "pm2p5Level": "0", "voiceRecogMode": "0", "token": "", "currentSongFavourited": "false", "voiceprintRecogStatus": "false", "humidityCtrlStatus": "false", "vboxId?": "", "co2ExceedRemind": "0", "indoorPM2p5Value": "0", "muteStatus": "false", "pmvStatus": "false", "healthMode": "false", "ErrAckFlag": "false", "pm2p5CleaningStatus": "false", "targetHumidity": "30", "softVersion": "", "indoorTemperature": "29.50", "windSpeed": "5", "heatAccumulationStatus": "false", "opSrc": "3", "playMode": "1", "volume": "100", "selfCleaning56Status": "false", "screenDisplayStatus": "true", "otaControl": "0", "windDirectionHorizontal": "5", "indoorHumidity": "64"}
    2023-07-15 01:12:07.736 DEBUG (MainThread) [custom_components.haier.coordinator] Finished fetching Haier Device [04E2290EXXXX] data in 0.171 seconds (success: True)
    2023-07-15 01:12:07.742 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[04E2290EXXXX]已获取到最新状态数据: {"windSensingStatus": "false", "silentSleepStatus": "false", "humidificationStatus": "false", "intelligenceStatus": "false", "location": "", "messageVersion": "", "pm2p5ExceedRemind": "0", "electricHeatingStatus": "false", "ch2oValue": "0", "rapidMode": "false", "voiceSignStatus": "false", "specialMode": "0", "energySavePeriod": "15", "10degreeHeatingStatus": "false", "time": "00:00:00", "ch2oCleaningStatus": "false", "humanSensingStatus": "0", "outdoorPM2p5Value": "0", "scheduleVersion": "", "acType": "0", "playControl": "0", "lightStatus": "false", "dialect": "0", "totalCleaningTime": "0", "updateStatus": "false", "authVersion": "0", "errCode": "0", "totalElectricityUsed": "0", "tempUnit": "1", "sensingResult": "0", "currentMediaName": "", "lockStatus": "false", "clientId": "", "playProgress": "0", "selfCleaningStatus": "false", "runningMode": "1", "airQuality": "0", "playTime": "0", "operationModeHK": "0", "hardVersion": "", "voiceStatus": "false", "operationMode": "1", "playStatus": "false", "co2Value": "0", "targetTemperature": "27.00", "vocValue": "0", "energySavingStatus": "false", "localFilterChangeFlag": "false", "freshAirStatus": "false", "onOffStatus": "false", "windDirectionVertical": "5", "halfDegreeSettingStatus": "false", "date": "00:00:00", "echoStatus": "false", "freshWindSpeed": "0", "outdoorTemperature": "29.00", "uniqueId": "", "pm2p5Level": "0", "voiceRecogMode": "0", "token": "", "currentSongFavourited": "false", "voiceprintRecogStatus": "false", "humidityCtrlStatus": "false", "vboxId?": "", "co2ExceedRemind": "0", "indoorPM2p5Value": "0", "muteStatus": "false", "pmvStatus": "false", "healthMode": "false", "ErrAckFlag": "false", "pm2p5CleaningStatus": "false", "targetHumidity": "30", "softVersion": "", "indoorTemperature": "29.50", "windSpeed": "5", "heatAccumulationStatus": "false", "opSrc": "3", "playMode": "1", "volume": "100", "selfCleaning56Status": "false", "screenDisplayStatus": "true", "otaControl": "0", "windDirectionHorizontal": "5", "indoorHumidity": "64"}
    2023-07-15 01:12:07.742 DEBUG (MainThread) [custom_components.haier.coordinator] Finished fetching Haier Device [04E2290EXXXX] data in 0.177 seconds (success: True)
    2023-07-15 01:12:07.744 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[04E2290EXXXX]已获取到最新状态数据: {"windSensingStatus": "false", "silentSleepStatus": "false", "humidificationStatus": "false", "intelligenceStatus": "false", "location": "", "messageVersion": "", "pm2p5ExceedRemind": "0", "electricHeatingStatus": "false", "ch2oValue": "0", "rapidMode": "false", "voiceSignStatus": "false", "specialMode": "0", "energySavePeriod": "15", "10degreeHeatingStatus": "false", "time": "00:00:00", "ch2oCleaningStatus": "false", "humanSensingStatus": "0", "outdoorPM2p5Value": "0", "scheduleVersion": "", "acType": "0", "playControl": "0", "lightStatus": "false", "dialect": "0", "totalCleaningTime": "0", "updateStatus": "false", "authVersion": "0", "errCode": "0", "totalElectricityUsed": "0", "tempUnit": "1", "sensingResult": "0", "currentMediaName": "", "lockStatus": "false", "clientId": "", "playProgress": "0", "selfCleaningStatus": "false", "runningMode": "1", "airQuality": "0", "playTime": "0", "operationModeHK": "0", "hardVersion": "", "voiceStatus": "false", "operationMode": "1", "playStatus": "false", "co2Value": "0", "targetTemperature": "27.00", "vocValue": "0", "energySavingStatus": "false", "localFilterChangeFlag": "false", "freshAirStatus": "false", "onOffStatus": "false", "windDirectionVertical": "5", "halfDegreeSettingStatus": "false", "date": "00:00:00", "echoStatus": "false", "freshWindSpeed": "0", "outdoorTemperature": "29.00", "uniqueId": "", "pm2p5Level": "0", "voiceRecogMode": "0", "token": "", "currentSongFavourited": "false", "voiceprintRecogStatus": "false", "humidityCtrlStatus": "false", "vboxId?": "", "co2ExceedRemind": "0", "indoorPM2p5Value": "0", "muteStatus": "false", "pmvStatus": "false", "healthMode": "false", "ErrAckFlag": "false", "pm2p5CleaningStatus": "false", "targetHumidity": "30", "softVersion": "", "indoorTemperature": "29.50", "windSpeed": "5", "heatAccumulationStatus": "false", "opSrc": "3", "playMode": "1", "volume": "100", "selfCleaning56Status": "false", "screenDisplayStatus": "true", "otaControl": "0", "windDirectionHorizontal": "5", "indoorHumidity": "64"}
    2023-07-15 01:12:07.744 DEBUG (MainThread) [custom_components.haier.coordinator] Finished fetching Haier Device [04E2290EXXXX] data in 0.177 seconds (success: True)
    2023-07-15 01:12:07.745 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[04E2290EXXXX]已获取到最新状态数据: {"windSensingStatus": "false", "silentSleepStatus": "false", "humidificationStatus": "false", "intelligenceStatus": "false", "location": "", "messageVersion": "", "pm2p5ExceedRemind": "0", "electricHeatingStatus": "false", "ch2oValue": "0", "rapidMode": "false", "voiceSignStatus": "false", "specialMode": "0", "energySavePeriod": "15", "10degreeHeatingStatus": "false", "time": "00:00:00", "ch2oCleaningStatus": "false", "humanSensingStatus": "0", "outdoorPM2p5Value": "0", "scheduleVersion": "", "acType": "0", "playControl": "0", "lightStatus": "false", "dialect": "0", "totalCleaningTime": "0", "updateStatus": "false", "authVersion": "0", "errCode": "0", "totalElectricityUsed": "0", "tempUnit": "1", "sensingResult": "0", "currentMediaName": "", "lockStatus": "false", "clientId": "", "playProgress": "0", "selfCleaningStatus": "false", "runningMode": "1", "airQuality": "0", "playTime": "0", "operationModeHK": "0", "hardVersion": "", "voiceStatus": "false", "operationMode": "1", "playStatus": "false", "co2Value": "0", "targetTemperature": "27.00", "vocValue": "0", "energySavingStatus": "false", "localFilterChangeFlag": "false", "freshAirStatus": "false", "onOffStatus": "false", "windDirectionVertical": "5", "halfDegreeSettingStatus": "false", "date": "00:00:00", "echoStatus": "false", "freshWindSpeed": "0", "outdoorTemperature": "29.00", "uniqueId": "", "pm2p5Level": "0", "voiceRecogMode": "0", "token": "", "currentSongFavourited": "false", "voiceprintRecogStatus": "false", "humidityCtrlStatus": "false", "vboxId?": "", "co2ExceedRemind": "0", "indoorPM2p5Value": "0", "muteStatus": "false", "pmvStatus": "false", "healthMode": "false", "ErrAckFlag": "false", "pm2p5CleaningStatus": "false", "targetHumidity": "30", "softVersion": "", "indoorTemperature": "29.50", "windSpeed": "5", "heatAccumulationStatus": "false", "opSrc": "3", "playMode": "1", "volume": "100", "selfCleaning56Status": "false", "screenDisplayStatus": "true", "otaControl": "0", "windDirectionHorizontal": "5", "indoorHumidity": "64"}
    2023-07-15 01:12:07.745 DEBUG (MainThread) [custom_components.haier.coordinator] Finished fetching Haier Device [04E2290EXXXX] data in 0.180 seconds (success: True)

[BUG]获取配置文件失败

问题描述
更新master之前在实体筛选中可以看到空调,更新之后实体筛选无法看到空调了
下面是更新之后的日志

环境信息:

  • Homeassistant版本: [e.g. 2023.6.2]

设备信息

'deviceType': '03001001',
'productCodeT': 'AB8Y74000'
'productNameT': 'KFR-72L/UDP21AU1室内机总成',
'wifiType': '00000000000000008080000000041410'

错误日志
2023-07-17 11:15:57.311 ERROR (MainThread) [custom_components.haier.core.client] 获取配置信息失败, wifi_type: 00000000000000008080000000041410, response: {"status": "1", "data": null, "total": 0}
2023-07-17 11:15:57.318 ERROR (MainThread) [custom_components.haier.core.device] 获取attributes失败
Traceback (most recent call last):
File "/config/custom_components/haier/core/device.py", line 68, in async_init
properties = (await self._client.get_hardware_config(self.wifi_type))['Property']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/core/client.py", line 153, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.core.client.HaierClientException: 获取配置文件失败
2023-07-17 11:15:57.329 ERROR (MainThread) [custom_components.haier] Device [2C37C52CB2D1] 未获取到可用attribute
2023-07-17 11:15:57.330 DEBUG (MainThread) [custom_components.haier] 共获取到0个设备
2023-07-17 11:16:28.546 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 581, in state
numerical_value = int(value)
^^^^^^^^^^

设置零冷水状态优化

在设置燃气热水器 零冷水运行状态时候,只能设置更改为第一个选项,或者下一个选项,有没有可以自定义第几个选项,比如我只想要一个零冷水单次选项,目前实现办法只能是先select_first,再执行一次select_next,但如果我想选《零冷水运行状态》第五个选项,就得select_next5次,能不能直接由select_second ……这样的,或者直接再来一个选项框,选第几个参数

[BUG] 空调climate实体无法控制

问题描述
最新master分支代码,climate实体可以正常显示,但是无法控制。经测试不管是运行模式还是风速都无法控制并且无法同步状态,只有扫风模式可以同步状态但是依然无法控制。手动使用遥控器开启空调之后,运行模式风速均显示为空白,并且climate实体的状态显示为未知,其他单独表示空调状态的sensor实体可以正常显示空调状态。

环境信息:

  • Homeassistant版本: 2023.7.2

设备信息

deviceType: 0201201G
productCodeT: AAABNH001
productNameT: KFR-35GW/05SNA81U1套机
wifiType: 2008610800820324021200118007264200000000000000000000000000000040
deviceType: 0301200L
productCodeT: AB91T7012
productNameT: KFR-72L/RAC81U1室内机总成
wifiType: 2008610800820324031200118006114500000000000000000000000000000040

错误日志
加载全部日志之后暂无相关报错,控制climate实体的时候也没有产生call service失败错误。

洗衣机在筛选中能看到,但是无生成任何实体

问题描述
洗衣机在筛选中能看到,但是无生成任何实体

环境信息:

  • Homeassistant版本: 2023.6.2

日志信息
此错误来自自定义集成。

Logger: custom_components.haier
Source: custom_components/haier/haier.py:181
Integration: Haier (documentation, issues)
First occurred: 23:49:32 (2 occurrences)
Last logged: 23:50:49

设备[DC330D89F953]初始化失败
Traceback (most recent call last):
File "/config/custom_components/haier/init.py", line 43, in async_setup_entry
specs = await client.get_hardware_config(device.wifi_type)
File "/config/custom_components/haier/haier.py", line 181, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.haier.HaierClientException: 获取配置文件失败

提示【获取配置文件失败】必看

提示获取配置文件失败表示设备跟当前API不兼容,暂时没有解决方案,目前正在考虑更换API,可以关注一下后续更新。

后续相关issue将不做回复直接关闭。

海尔洗衣机 Warning-attribute airWashPara36 not found in the coordinator

问题描述
海尔洗衣机
日志提示Warning

环境信息:

  • Homeassistant版本: 2023.6.1

此错误来自自定义集成。

Logger: custom_components.haier
Source: custom_components/haier/init.py:185
Integration: Haier (documentation, issues)
First occurred: 22:25:51 (74 occurrences)
Last logged: 22:25:51

Device A0822275C66A attribute airWashPara36 not found in the coordinator
Device A0822275C66A attribute airWashPara37 not found in the coordinator
Device A0822275C66A attribute airWashPara38 not found in the coordinator
Device A0822275C66A attribute airWashPara39 not found in the coordinator
Device A0822275C66A attribute airWashPara40 not found in the coordinator

热水器在筛选中能看到,但是无生成任何实体

报错:Unknown error occurred

日志:
Logger: aiohttp.server
Source: custom_components/haier/haier.py:181
Integration: Haier (documentation, issues)
First occurred: 16:03:00 (1 occurrences)
Last logged: 16:03:00

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 241, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/haier/config_flow.py", line 145, in async_step_entity_device_selector
return await self.async_step_entity_filter()
File "/config/custom_components/haier/config_flow.py", line 186, in async_step_entity_filter
spec_resp = await client.get_hardware_config(target_device['wifi_type'])
File "/config/custom_components/haier/haier.py", line 181, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.haier.HaierClientException: 获取配置文件失败

Logger: custom_components.haier.haier
Source: custom_components/haier/haier.py:179
Integration: Haier (documentation, issues)
First occurred: 15:57:17 (3 occurrences)
Last logged: 16:03:00

获取配置信息失败, wifi_type: 111c120024000810181300418002484300000200000000000000000000000000, response: {"status": "1", "data": null, "total": 0}

Logger: custom_components.haier
Source: custom_components/haier/haier.py:181
Integration: Haier (documentation, issues)
First occurred: 15:57:17 (2 occurrences)
Last logged: 15:57:47

设备[18A7F132FC40]初始化失败
Traceback (most recent call last):
File "/config/custom_components/haier/init.py", line 43, in async_setup_entry
specs = await client.get_hardware_config(device.wifi_type)
File "/config/custom_components/haier/haier.py", line 181, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.haier.HaierClientException: 获取配置文件失败

卡萨帝冰箱识别不了

在海尔智家app里可以看到冰箱
在添加设备里能找到冰箱,设备添加不进去:
image

此错误来自自定义集成。

Logger: custom_components.haier
Source: custom_components/haier/haier.py:181
Integration: Haier (documentation, issues)
First occurred: 11:04:22 (2 occurrences)
Last logged: 13:54:38

设备[DC330DE0A63D]初始化失败
Traceback (most recent call last):
File "/config/custom_components/haier/init.py", line 44, in async_setup_entry
specs = await client.get_hardware_config(device.wifi_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/haier/haier.py", line 181, in get_hardware_config
raise HaierClientException('获取配置文件失败')
custom_components.haier.haier.HaierClientException: 获取配置文件失败

所有设备只有 sensor 和 binary sensor

问题描述
我有一台卡萨帝冰吧,和饮水机,还有几个开关,传感器,晾衣架,这些都正常导入了,但是实体只有 sensor 和 binary sensor,我的问题是 为什么没有 switch

环境信息:

  • Homeassistant版本: [e.g. 2023.6.2]

设备信息
若是设备无法识别或控制错误则此项必填

以下信息开启debug模式后可在Device Info部分的日志中找到。日志可在配置 > 系统 > 日志 > 加载完整日志中查看。

deviceType:
productCodeT:
productNameT:
wifiType:

错误日志

climate卡片部分机型无法开机,风管机通过climate卡片无法正常开机,挂机正常

问题描述
已使用最新代码climate卡片部分机型无法开机,我家有安装风管机与挂机,风管机通过climate卡片无法正常开机,
通过独立开关实体可以正常开关机

环境信息:

  • Homeassistant版本: 20230705.1 - latest

设备信息
若是设备无法识别或控制错误则此项必填

deviceType:0201201G
productCodeT:AAABTB00E
productNameT:KFR-26G/KBB83U1室内机总成
wifiType:2008610800820324021200118007264200000000000000000000000000000040(挂机,climate卡片功能正常)

deviceType:0D012001
productCodeT:AA9KK9007
productNameT:KFRD-72NW/64DDA21Z
wifiType:201c1200240008100d12f71c4094f300000080e384181627a2904f4940b24240(风管机,climate卡片无法开机,通过独立开关实体开机之后操作正常关机正常)

deviceType:0D012001
productCodeT:AA9KK7007
productNameT:KFRD-36NW/61DBA21Z
wifiType:201c1200240008100d12f71c4094f300000080e384181627a2904f4940b24240(风管机,climate卡片无法开机,通过独立开关实体开机之后操作正常关机正常)

以下信息开启debug模式后可在Device Info部分的日志中找到。日志可在配置 > 系统 > 日志 > 加载完整日志中查看。

deviceType:0D012001
productCodeT:AA9KK7007
productNameT:KFRD-36NW/61DBA21Z
wifiType:201c1200240008100d12f71c4094f300000080e384181627a2904f4940b24240

deviceType:0D012001
productCodeT:AA9KK9007
productNameT:KFRD-72NW/64DDA21Z
wifiType:201c1200240008100d12f71c4094f300000080e384181627a2904f4940b24240

[错误日志]

设备[145790A56192]是挂机空调,climate卡片功能正常,正常开机
2023-07-23 10:44:20.561 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[145790A56192]已获取到最新状态数据: {"intelligenceStatus": "false", "humidificationStatus": "false", "silentSleepStatus": "false", "electricHeatingStatus": "false", "ch2oValue": "0", "rapidMode": "false", "energySavePeriod": "15", "specialMode": "0", "10degreeHeatingStatus": "false", "ch2oCleaningStatus": "false", "humanSensingStatus": "0", "outdoorPM2p5Value": "0", "acType": "0", "lightStatus": "false", "totalCleaningTime": "0", "errCode": "", "totalElectricityUsed": "0", "sensingResult": "0", "tempUnit": "1", "lockStatus": "false", "selfCleaningStatus": "false", "airQuality": "0", "operationModeHK": "0", "operationMode": "6", "co2Value": "0", "targetTemperature": "26.00", "vocValue": "0", "localFilterChangeFlag": "false", "energySavingStatus": "false", "freshAirStatus": "false", "windDirectionVertical": "0", "onOffStatus": "false", "halfDegreeSettingStatus": "false", "echoStatus": "false", "outdoorTemperature": "33.00", "pm2p5Level": "0", "indoorPM2p5Value": "0", "pmvStatus": "false", "muteStatus": "false", "healthMode": "false", "ErrAckFlag": "false", "pm2p5CleaningStatus": "false", "targetHumidity": "30", "indoorTemperature": "31.50", "windSpeed": "2", "heatAccumulationStatus": "false", "opSrc": "3", "screenDisplayStatus": "true", "windDirectionHorizontal": "0", "indoorHumidity": "0"}
2023-07-23 10:44:20.561 DEBUG (MainThread) [custom_components.haier.coordinator] Finished fetching Haier Device [145790A56192] data in 0.280 seconds (success: True)
2023-07-23 10:44:34.541 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[145790A56192]已获取到最新状态数据: {"intelligenceStatus": "false", "humidificationStatus": "false", "silentSleepStatus": "false", "electricHeatingStatus": "false", "ch2oValue": "0", "rapidMode": "false", "energySavePeriod": "15", "specialMode": "0", "10degreeHeatingStatus": "false", "ch2oCleaningStatus": "false", "humanSensingStatus": "0", "outdoorPM2p5Value": "0", "acType": "0", "lightStatus": "false", "totalCleaningTime": "0", "errCode": "", "totalElectricityUsed": "0", "sensingResult": "0", "tempUnit": "1", "lockStatus": "false", "selfCleaningStatus": "false", "airQuality": "0", "operationModeHK": "0", "operationMode": "6", "co2Value": "0", "targetTemperature": "26.00", "vocValue": "0", "localFilterChangeFlag": "false", "energySavingStatus": "false", "freshAirStatus": "false", "windDirectionVertical": "0", "onOffStatus": "true", "halfDegreeSettingStatus": "false", "echoStatus": "false", "outdoorTemperature": "33.00", "pm2p5Level": "0", "indoorPM2p5Value": "0", "pmvStatus": "false", "muteStatus": "false", "healthMode": "false", "ErrAckFlag": "false", "pm2p5CleaningStatus": "false", "targetHumidity": "30", "indoorTemperature": "31.50", "windSpeed": "2", "heatAccumulationStatus": "false", "opSrc": "3", "screenDisplayStatus": "true", "windDirectionHorizontal": "0", "indoorHumidity": "0"}

设备[3429EF28ADE4]是风管机空调,无法通过climate卡片开机,日志中没有看到对应的错误日志
2023-07-23 10:45:04.685 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[3429EF28ADE4]已获取到最新状态数据: {"silentSleepStatus": "false", "co2Value": "0", "intelligenceStatus": "false", "humidificationStatus": "false", "targetTemperature": "27.00", "vocValue": "0", "localFilterChangeFlag": "false", "energySavingStatus": "false", "electricHeatingStatus": "false", "freshAirStatus": "false", "ch2oValue": "0", "rapidMode": "false", "onOffStatus": "false", "windDirectionVertical": "0", "halfDegreeSettingStatus": "false", "echoStatus": "false", "outdoorTemperature": "33.00", "specialMode": "0", "10degreeHeatingStatus": "false", "pm2p5Level": "0", "ch2oCleaningStatus": "false", "humanSensingStatus": "0", "outdoorPM2p5Value": "0", "indoorPM2p5Value": "0", "acType": "0", "muteStatus": "false", "pmvStatus": "false", "healthMode": "false", "ErrAckFlag": "false", "pm2p5CleaningStatus": "false", "lightStatus": "false", "targetHumidity": "30", "totalCleaningTime": "0", "errCode": "", "sensingResult": "0", "tempUnit": "1", "lockStatus": "false", "selfCleaningStatus": "false", "indoorTemperature": "30.00", "windSpeed": "2", "airQuality": "0", "opSrc": "3", "screenDisplayStatus": "true", "operationMode": "6", "windDirectionHorizontal": "0", "indoorHumidity": "0"}
2023-07-23 10:45:05.415 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[3429EF28ADE4]已获取到最新状态数据: {"silentSleepStatus": "false", "co2Value": "0", "intelligenceStatus": "false", "humidificationStatus": "false", "targetTemperature": "27.00", "vocValue": "0", "localFilterChangeFlag": "false", "energySavingStatus": "false", "electricHeatingStatus": "false", "freshAirStatus": "false", "ch2oValue": "0", "rapidMode": "false", "onOffStatus": "false", "windDirectionVertical": "0", "halfDegreeSettingStatus": "false", "echoStatus": "false", "outdoorTemperature": "33.00", "specialMode": "0", "10degreeHeatingStatus": "false", "pm2p5Level": "0", "ch2oCleaningStatus": "false", "humanSensingStatus": "0", "outdoorPM2p5Value": "0", "indoorPM2p5Value": "0", "acType": "0", "muteStatus": "false", "pmvStatus": "false", "healthMode": "false", "ErrAckFlag": "false", "pm2p5CleaningStatus": "false", "lightStatus": "false", "targetHumidity": "30", "totalCleaningTime": "0", "errCode": "", "sensingResult": "0", "tempUnit": "1", "lockStatus": "false", "selfCleaningStatus": "false", "indoorTemperature": "30.00", "windSpeed": "2", "airQuality": "0", "opSrc": "3", "screenDisplayStatus": "true", "operationMode": "6", "windDirectionHorizontal": "0", "indoorHumidity": "0"}

日志中只有看到部分实体不可用的错误日志
2023-07-23 10:45:05.425 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 229, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 374, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in async_update_listeners
update_callback()
File "/config/custom_components/haier/entity.py", line 47, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 742, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 810, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 572, in state
raise ValueError(
ValueError: Sensor sensor.3429ef28ade4_pm2p5level provides state value '0', which is not in the list of options provided

不显示 集成

image image

是否对ha版本有要求?
试过 hacs 和拖拽文件进去的两种方式 重启过很多次, 都搜不到haier集成

功能诉求

问题描述
冰箱有一个小优语音,有没有可能打开media功能?变成想小爱音响类似。想让他放啥就放啥?

环境信息:

  • Homeassistant版本: [e.g. 2023.7.2]

设备信息

以下信息开启debug模式后可在Device Info部分的日志中找到。日志可在配置 > 系统 > 日志 > 加载完整日志中查看。

deviceType:
productCodeT:
productNameT:
wifiType:

没找到上面的日志,我找到了有关日志
2023-07-19 09:05:15.418 DEBUG (MainThread) [custom_components.haier.coordinator] 设备[84267A7FA408]已获取到最新状态数据: {"freezerTemperatureC": "-20", "micErrCode": "0", "freezerDoorStatus": "false", "messageVersionInt": "0", "vtRoomTemperature": "-10", "voiceModuleVolume": "70", "vtRoom2TargetTempLevel": "35", "voiceModuleWakeStatus": "false", "scheduleVersionInt": "0", "voiceModuleOnOffStatus": "false", "refrigeratorTargetTempLevel": "6", "freezerTargetTempLevel": "10", "refrigeratorTemperatureC": "5", "refrigeratorDoorStatus": "false", "envTemperature": "32", "envHumidity": "65", "intelligenceMode": "false", "quickFreezingMode": "false", "vtRoomTargetTempLevel": "21", "panelWakeStatus": "false", "voiceModuleElecTestMode": "0", "voiceStatus": "true", "voiceModuleBroadcastStatus": "false"}
2023-07-19 09:05:15.419 DEBUG (MainThread) [custom_components.haier.coordinator] Finished fetching Haier Device [84267A7FA408] data in 0.178 seconds (success: True)

错误日志

海尔燃气热水器能否改成climate类型的?

问题描述
目前燃气热水器有两个比较关键的实体:
1.开关机状态实体
switch.3429ef23bae1_onoffstatus
2.目标温度实体
number.3429ef23bae1_targettemp

开关机和调节温度都是通过这两个实体操作,是否能改成climate类型的实体,方便操作也方便桥接到HK里面。

环境信息:

  • Homeassistant版本: [e.g. 2023.7.2]

最后,感谢大佬对HA的贡献,让海尔设备的接入有了更多更好的选择!

提交后报错,Error setting up entry haier for haier Traceback (most recent call last)

image
报错信息:
Error setting up entry haier for haier
Traceback (most recent call last):
File "/Users/dingzhenying/.homeassistant/lib/python3.11/site-packages/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dingzhenying/.homeassistant/custom_components/haier/init.py", line 29, in async_setup_entry
coordinator = await new_device_coordinator(hass, client, device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dingzhenying/.homeassistant/custom_components/haier/init.py", line 53, in new_device_coordinator
device['config'] = await client.get_hardware_config(device['wifiType'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dingzhenying/.homeassistant/custom_components/haier/haier.py", line 109, in get_hardware_config
async with http_client.get(url=content['data']['url']) as config_resp:
~~~~~~~~~~~~~~~^^^^^^^
TypeError: 'NoneType' object is not subscriptable

海尔空调无法控制

问题描述
海尔空调无法控制

环境信息:

  • Homeassistant版本: [e.g. 2023.6.2]

设备信息
若是设备无法识别或控制错误则此项必填
海尔 KFR-35GW/12CAA81U1

以下信息开启debug模式后可在Device Info部分的日志中找到。日志可在配置 > 系统 > 日志 > 加载完整日志中查看。

deviceType:
productCodeT:
productNameT:
wifiType:

错误日志

不能识别海尔燃气热水器

在海尔智家APP正常使用海尔零冷水燃气热水器,使用v0.1.1正常登陆,但未发现任何设备。
零冷水燃气热水器型号:JSQ31-16WRS(12T)U1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.