Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

米家空调插座回报HomeKit温度问题 #800

Closed
A1exMinatoooo opened this issue Sep 20, 2022 · 3 comments
Closed

米家空调插座回报HomeKit温度问题 #800

A1exMinatoooo opened this issue Sep 20, 2022 · 3 comments

Comments

@A1exMinatoooo
Copy link

我使用的配件是【米家空调伴侣2】,通过 HomeAssistant 接入 HomeKit 后,在 HomeKit 首页的快捷开关上始终会显示一个【21°】,并会被纳入房间内环境传感器中统计(如下图)

image

但是点开开关后里面是正常的温度控制,并没有【21°】相关的内容

image

同时在 HomeAssistant 中查看实体相关数据也没有找到【21°】,请问是什么原因呢?

image

@al-one
Copy link
Owner

al-one commented Sep 20, 2022

https://github.com/home-assistant/core/blob/dev/homeassistant/components/homekit/type_thermostats.py#L217-L219
image

由于空调伴侣没有温度传感器,无法获取当前室温,实体属性current_temperature: null,HA的homekit集成在未获取到温控器实体的当前温度时会默认用21.0℃去作为默认值。推荐通过自定义选项bind_sensor去为温控器实体绑定温度传感器。

@al-one al-one closed this as completed Dec 1, 2022
@Jack-Works
Copy link
Contributor

如果没有温度传感器,可以通过 current_temp_property 使用空调的目标温度作为显示的温度,例:

customizing_device:
  lumi.acpartner.mcn02:
    sensor_attributes: electric_power,power_cost_today,power_cost_month
    current_temp_property: target_temperature

@eMUQI
Copy link

eMUQI commented Oct 13, 2023

我最近也遇到了这个问题,你可以参考以下步骤:

  1. config目录下的configuration.yaml添加下面内容:
homeassistant:
  customize: !include customize.yaml 
  1. 在config目录下创建customize.yaml,将温度传感器绑定到空调伴侣实体。对应的设备名称和实体名称需要根据实际情况调整(在“设置-设备与服务-实体注册表”中可以得到):
climate.lumi_mcn02_d045_air_conditioner:    # 空调伴侣实体ID
  bind_sensor: sensor.miaomiaoce_t2_0b9e_temperature_humidity_sensor    #温度传感器实体ID
  1. 重启 HomeAssistant
docker-compose restart

https://wulu.zone/posts/mi-iot-homekit#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants