haier icon indicating copy to clipboard operation
haier copied to clipboard

目前,不能通过集成的climate的开关按钮启动空调

Open red1918 opened this issue 11 months ago • 9 comments

目前,不能通过集成的climate的开关按钮启动空调

在hass里面,可以用【开关机状态】这个按钮来打开/关闭空调,之前是可以使用climate带的开关按钮启动/关闭空调的

我是用bamfa巴法云连接到小爱音箱,目前这个climate按钮不能启动空调,这让我不能通过小爱音箱语音来启动

想了解下,这是海尔的问题,还是目前集成的问题, 或者,或者,仅仅是我的问题,个例?

red1918 avatar Jan 24 '25 17:01 red1918

请按issue模板提供设备信息和运行日志

banto6 avatar Jan 25 '25 01:01 banto6

请按issue模板提供设备信息和运行日志

问题描述 我也是通过巴法云接入到小爱的,目前也有类似的问题,ha里操作都是正常的,巴法云调用不正常。 具体情况是巴法云App里的开关不响应,但是通过其他方式打开后,空调的开关状态和其他参数还是能同步到巴法云的,然后在巴法云操作风量温度冷暖模式也都正常

环境信息:

  • Core 2025.1.2
  • Supervisor 2024.12.3
  • Operating System 14.1

错误日志

日志记录器: homeassistant.core
来源: core.py:2815
首次出现: 20:18:43 (4 次总计出现)
上次记录: 20:19:55

Error executing service: <ServiceCall climate.turn_off (c:01JJEPCVXRFWA95DBE2F8BYBKX): entity_id=['climate.******_climate']>
Error executing service: <ServiceCall climate.turn_off (c:01JJEPDFWY6TTM3VCY2JB0MZR7): entity_id=['climate.******_climate']>
Error executing service: <ServiceCall climate.turn_off (c:01JJEPE6H3163D3D4Y0Z8JAJ82): entity_id=['climate.******_climate']>
Error executing service: <ServiceCall climate.turn_on (c:01JJEPF1Y1GP60YESS4NNA3ED4): entity_id=['climate.******_climate']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 2815, in _run_service_call_catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 2838, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 990, in entity_service_call
    raise ServiceNotSupported(call.domain, call.service, entity.entity_id)
homeassistant.exceptions.ServiceNotSupported: Entity climate.******_climate does not support action climate.turn_off

device.json

zhichengroup avatar Jan 25 '25 12:01 zhichengroup

@zhichengroup 我昨天用了 2024.5.1版本的hass(docker版) 和 haier 1.0.0的集成,可以用小爱语言+bemfa 可以语音控制了,你也可以试试,我不懂代码,纯靠一个个试。哈哈,你的这个运行日记我都不知道在哪里获得 我的是用黑裙的docker

red1918 avatar Jan 26 '25 08:01 red1918

用master分支代码试试

banto6 avatar Feb 05 '25 11:02 banto6

用master分支代码是能解决问题了,可以正常开机和关机,但是只要是通过小爱+巴法开机,就会把空调模式变为自动。 有没有办法只开机,但是不改变关机前的设定么?

Hhumor avatar Feb 16 '25 09:02 Hhumor

HA开发文档中提到turn on/off其实就是通过改变hvac_mode来实现的,所以我认为不改变状态是没有办法实现,如果本身需求是想一直设定为制热/制冷,则可以通过修改这个实现

https://github.com/banto6/haier/blob/bf754df8429853aa6fc1e73da8cfe62da872dbc6/custom_components/haier/climate.py#L108

可选值详见: https://developers.home-assistant.io/docs/core/entity/climate/#hvac-action

banto6 avatar Feb 17 '25 01:02 banto6

用master分支代码是能解决问题了,可以正常开机和关机,但是只要是通过小爱+巴法开机,就会把空调模式变为自动。 有没有办法只开机,但是不改变关机前的设定么?

你和我是同样的,先前我也问了相同的问题,我也希望能用上一次关机的状态启动

red1918 avatar Feb 17 '25 10:02 red1918

@red1918 @Hhumor 试试feature/climate分支的代码呢

banto6 avatar Feb 19 '25 01:02 banto6

@red1918 @Hhumor 试试feature/climate分支的代码呢

试了一下,让小爱把空调调成制冷模式,实际执行变成了自动,让小爱把空调调成自动模式,就是能变成自动模式。 关机前在hass中将空调调成制冷模式,然后让小爱关掉空调,再让小爱打开空调,听到空调滴~滴~两声(被调整了两次),空调打开还是自动模式

以下是空调在hass中的日志

Image

Hhumor avatar Apr 16 '25 16:04 Hhumor