Blear / HassLife

天猫精灵、小爱同学控制HomeAssistant设备和属性上报查询
131 stars 18 forks source link

似乎用小爱同学空调在调节温度的时候会自动切到制热模式 #13

Open freeranwang opened 1 month ago

freeranwang commented 1 month ago

我用homeassistant客户端直接调整温度,空调运行正常,不会切换模式。 用hasslife接入小爱同学之后,让空调调整温度,它会自动把空调调到制热模式。 此外,打开空调的时候,空调也会调到制热模式。

debug显示用小爱打开空调和调节温度的时候,mqtt会收到“heat”指令。

Blear commented 1 month ago

是否有安装控制插件?

18341311586 commented 4 weeks ago

遇到同样问题,空调的任何操作都会调整为制热模式

18341311586 commented 4 weeks ago

空调响应日志

IMG_0042

以下是debug日志 [{"domain":"climate","service":"turn_on","data":{"entity_id":"climate.6_climate"}},{"domain":"climate","service":"set_temperature","data":{"temperature":26,"entity_id":"climate.6_climate"}}]}} 2024-09-02 10:23:05.101 DEBUG (Thread-3 (main)) [custom_components.hasslife] process_json_pack {'Type': 'DeviceControl', 'Payload': {'Rows': [{'domain': 'climate', 'service': 'turn_on', 'data': {'entity_id': 'climate.6_climate'}}, {'domain': 'climate', 'service': 'set_temperature', 'data': {'temperature': 26, 'entity_id': 'climate.6_climate'}}]}} 2024-09-02 10:23:05.102 INFO (Thread-3 (main)) [custom_components.hasslife] receive device state:{'Type': 'DeviceControl', 'Payload': {'Rows': [{'domain': 'climate', 'service': 'turn_on', 'data': {'entity_id': 'climate.6_climate'}}, {'domain': 'climate', 'service': 'set_temperature', 'data': {'temperature': 26, 'entity_id': 'climate.6_climate'}}]}} 2024-09-02 10:23:05.636 INFO (MainThread) [custom_components.hasslife] send :{'Type': 'SyncState', 'Payload': {'Username': '', 'Password': '', 'Version': 2.1, 'State': '{"attributes": {"current_temperature": 24.5, "fan_mode": "low", "fan_modes": ["auto", "low", "medium", "high"], "friendly_name": "Climate", "hvac_modes": ["off", "auto", "cool", "heat", "dry", "fan_only"], "max_temp": 30.0, "min_temp": 16.0, "supported_features": 425, "swing_mode": "vertical", "swing_modes": ["off", "vertical", "horizontal", "both"], "target_temp_step": 1.0, "temperature": 26.0}, "context": {"id": "01J6S44WWTGER3J953KZR", "parent_id": null, "user_id": null}, "entity_id": "climate.6_climate", "last_changed": "2024-09-02T10:22:50.182100+00:00", "last_reported": "2024-09-02T10:23:05.634151+00:00", "last_updated": "2024-09-02T10:23:05.634151+00:00", "state": "heat"}'}} 2024-09-02 10:23:05.639 INFO (MainThread) [custom_components.hasslife] send :{'Type': 'SyncState', 'Payload': {'Username': '', 'Password': '', 'Version': 2.1, 'State': '{"attributes": {"current_temperature": 24.5, "fan_mode": "low", "fan_modes": ["auto", "low", "medium", "high"], "friendly_name": "Climate", "hvac_modes": ["off", "auto", "cool", "heat", "dry", "fan_only"], "max_temp": 30.0, "min_temp": 16.0, "supported_features": 425, "swing_mode": "vertical", "swing_modes": ["off", "vertical", "horizontal", "both"], "target_temp_step": 1.0, "temperature": 26.0}, "context": {"id": "01J6S44WWTGER3", "parent_id": null, "user_id": null}, "entity_id": "climate.6_climate", "last_changed": "2024-09-02T10:22:50.182100+00:00", "last_reported": "2024-09-02T10:23:05.634151+00:00", "last_updated": "2024-09-02T10:23:05.634151+00:00", "state": "heat"}'}}

Blear commented 4 weeks ago

以下是debug日志 [{"domain":"climate","service":"turn_on","data":{"entity_id":"climate.6_climate"}},{"domain":"climate","service":"set_temperature","data":{"temperature":26,"entity_id":"climate.6_climate"}}]}} 2024-09-02 10:23:05.101 DEBUG (Thread-3 (main)) [custom_components.hasslife] process_json_pack {'Type': 'DeviceControl', 'Payload': {'Rows': [{'domain': 'climate', 'service': 'turn_on', 'data': {'entity_id': 'climate.6_climate'}}, {'domain': 'climate', 'service': 'set_temperature', 'data': {'temperature': 26, 'entity_id': 'climate.6_climate'}}]}} 2024-09-02 10:23:05.102 INFO (Thread-3 (main)) [custom_components.hasslife] receive device state:{'Type': 'DeviceControl', 'Payload': {'Rows': [{'domain': 'climate', 'service': 'turn_on', 'data': {'entity_id': 'climate.6_climate'}}, {'domain': 'climate', 'service': 'set_temperature', 'data': {'temperature': 26, 'entity_id': 'climate.6_climate'}}]}} 2024-09-02 10:23:05.636 INFO (MainThread) [custom_components.hasslife] send :{'Type': 'SyncState', 'Payload': {'Username': '', 'Password': '', 'Version': 2.1, 'State': '{"attributes": {"current_temperature": 24.5, "fan_mode": "low", "fan_modes": ["auto", "low", "medium", "high"], "friendly_name": "Climate", "hvac_modes": ["off", "auto", "cool", "heat", "dry", "fan_only"], "max_temp": 30.0, "min_temp": 16.0, "supported_features": 425, "swing_mode": "vertical", "swing_modes": ["off", "vertical", "horizontal", "both"], "target_temp_step": 1.0, "temperature": 26.0}, "context": {"id": "01J6S44WWTGER3J953KZR", "parent_id": null, "user_id": null}, "entity_id": "climate.6_climate", "last_changed": "2024-09-02T10:22:50.182100+00:00", "last_reported": "2024-09-02T10:23:05.634151+00:00", "last_updated": "2024-09-02T10:23:05.634151+00:00", "state": "heat"}'}} 2024-09-02 10:23:05.639 INFO (MainThread) [custom_components.hasslife] send :{'Type': 'SyncState', 'Payload': {'Username': '', 'Password': '', 'Version': 2.1, 'State': '{"attributes": {"current_temperature": 24.5, "fan_mode": "low", "fan_modes": ["auto", "low", "medium", "high"], "friendly_name": "Climate", "hvac_modes": ["off", "auto", "cool", "heat", "dry", "fan_only"], "max_temp": 30.0, "min_temp": 16.0, "supported_features": 425, "swing_mode": "vertical", "swing_modes": ["off", "vertical", "horizontal", "both"], "target_temp_step": 1.0, "temperature": 26.0}, "context": {"id": "01J6S44WWTGER3", "parent_id": null, "user_id": null}, "entity_id": "climate.6_climate", "last_changed": "2024-09-02T10:22:50.182100+00:00", "last_reported": "2024-09-02T10:23:05.634151+00:00", "last_updated": "2024-09-02T10:23:05.634151+00:00", "state": "heat"}'}}

你可以看到这边的DeviceControl发送的命令有两个,一个是打开空调,一个是设定温度,没有调用到切换制热的命令哈,所以有没有可能是这边你的homeassistant的turn_on 自动默认为制热呢,而且这种情况我无法说打开空调给你们调用一下模式为制冷,那冬天的话 你这边打开又默认制冷 你又得调整。

freeranwang commented 4 weeks ago

我非常确定不是homeassistant的问题。首先不光是turn_on,而是做任何操作(包括运行中设定温度)都会把模式改成制热。其次我用homeassistant客户端直接调整(不通过hasslife)是没有这个现象的。我是装了控制插件的,否则呼叫小爱不会有响应。

freeranwang commented 4 weeks ago

我和另一位朋友应该是遇到了同样的问题,我在homeassitant看到的现象是只要我通过小爱音箱向发出任何命令(调节温度,调整风速,开机,甚至包括调整模式),都会首先发出一个制热的命令。例如我说把空调调到制冷模式,空调会先收到一个制热命令,然后收到一个制冷命令,这种操作从逻辑上也不可能和任何“默认值”有关。

Blear commented 4 weeks ago

我和另一位朋友应该是遇到了同样的问题,我在homeassitant看到的现象是只要我通过小爱音箱向发出任何命令(调节温度,调整风速,开机,甚至包括调整模式),都会首先发出一个制热的命令。例如我说把空调调到制冷模式,空调会先收到一个制热命令,然后收到一个制冷命令,这种操作从逻辑上也不可能和任何“默认值”有关。

但是从你上面发出来的调试日志里看,里面是没有看到切换模式的命令的,你用homeassistant的开发者里面的命令调用,调用下turn_on 和set_temperature 试试看呢

freeranwang commented 4 weeks ago

上面那个不是我,我不认识他,但是看起来我们遇到了一样的问题。

freeranwang commented 4 weeks ago

我只要不通过hasslife,用homeassistant的任何操作都不会发送制热命令

freeranwang commented 4 weeks ago

除非我发送的就是“制热”

Hhumor commented 2 weeks ago

我也是遇到这个问题,也是海尔的。bemfa有这个问题所以换hasslife试试,也是一样的