banto6 / haier

海尔智能家居设备接入HomeAssistant
Apache License 2.0
454 stars 103 forks source link

升级到core 2024.5.0/1 后热水器实体状态及控制异常 #116

Closed jiqigo closed 2 weeks ago

jiqigo commented 2 weeks ago

。。。万分感谢大佬的辛苦! 问题描述 使用alpha.3版本,2024.4.4正常,升级到core 2024.5.0/1 后热水器实体状态及控制异常。 ha中关闭后,实际关闭,但开关又指示开; 实际开启时,温度正常,ha开启循环后无法关闭循环; 所有操作状态日志没有更新;

环境信息:

设备信息 海尔热水器JSQ30-16R3BWU1

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

deviceType:18015007
productCodeT:GD0RD9004
productNameT:JSQ30-16R3BWU1
wifiType:201c120000118674181500418006360000000000000000000000000000000040

错误日志 截取 2024-05-04 06:28:00.075 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener (<Job listen haier_device_data_changed HassJobType.Executor <function HaierAbstractEntity.async_added_to_hass..data_callback at 0x7f5f3bdaeb60>>, None) 2024-05-04 06:26:50.555 WARNING (ImportExecutor_0) [homeassistant.helpers.typing] HomeAssistantType was used from haier, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'haier' custom integration 2024-05-04 06:28:16.334 WARNING (SyncWorker_2) [homeassistant.helpers.frame] Detected that custom integration 'haier' calls async_write_ha_state from a thread at custom_components/haier/entity.py, line 64: self.async_write_ha_state(), please report it to the author of the 'haier' custom integration 2024-05-04 06:38:03.462 WARNING (SyncWorker_24) [homeassistant.helpers.frame] Detected that custom integration 'haier' calls async_write_ha_state from a thread at custom_components/haier/entity.py, line 75: self.async_write_ha_state(), please report it to the author of the 'haier' custom integration

jiqigo commented 2 weeks ago

根据日志内容,可能找到问题了: /homeassistant/custom_components/haier/entity.py 两处“async_write_ha_state”替换成“schedule_update_ha_state”。 先测试一下,看看怎样。

banto6 commented 2 weeks ago

fixed