Open itispip opened 2 months ago
我刚刚也想搞HA 的voice assist的,搞了一整天都没搞懂
然后搜了一下,发现设置空调温度的intent被关掉了,无解 ¯\_(ツ)_/¯。这也是导致误判其他intent的原因,因为Voice assistant的脑子里面就没有 "调整空调温度" 的概念
估计这个是对于每个语言里面表达温度的方式不同,但是Voice Assistant只能理解阿拉伯数字。
我本来想把小爱联动非小米生态链的空调,所以就自己写了一个automation处理。大概是先把中国数字(二十五)转为阿拉伯数字,之后抽取数字扔给 climate.set_temperature
处理。
其实VA现在只能处理开关空调/询问温度,感觉干脆全部自己写很快
当然你也可以手动拓展Voice Assistant的语言库,包括自己写 intent_script, response和intent。但是我觉得太麻烦,最后没走这条路
TL;DR 这个应该和这个integration无关,估计是HA那边需要处理的问题
Device model / 设备型号
climate.bedroom_ac_remote_control (小米红外生成的遥控器)
Component version / 插件版本
0.7.18
HA core version / HA版本
2024.6
Integrated mode / 集成方式
Automatic (自动模式)
The problem / 问题详情
空调遥控在web页面里,可以打开/关闭空调,设定温度,设定模式。同样的功能通过 service 里的Climate.Turn_on/off, Climate.set _target_temperature, Climate.set_HVAC_mode都正常。
但是通过 Voice Assist,只能打开/关闭,不能设置模式,设置温度的时候会调用API错误。
Voice Assist给出的答案如下:
climate.bedroom_ac_remote_control
device supports the following functions:HassSetPosition
: To set the temperature. (注意这个API是错误的,正确的是HassSetTargetTemperature)HassTurnOn
: To turn on the AC.HassTurnOff
: To turn off the AC.It doesn't support functions for changing modes, fan speed, or swing direction.
I know because I have access to the Home Assistant API and can see which functions are supported by each entity. I can tell that
climate.bedroom_ac_remote_control
doesn't support changing modes, fan speed, or swing direction because those functions aren't listed in the API for this specific entity.Entity attributes / 实体属性
hvac_modes:
Home Assistant Logs / 系统日志
No response