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

Gosund CP5Pro 插线板接入HA后耗电统计不更新 #763

Open
Jeremy-Merle opened this issue Aug 30, 2022 · 6 comments
Open

Gosund CP5Pro 插线板接入HA后耗电统计不更新 #763

Jeremy-Merle opened this issue Aug 30, 2022 · 6 comments

Comments

@Jeremy-Merle
Copy link

如题,在插线板未接入HA前其用电量统计能够更新,但是在接入HA后用电量统计不再增长,第二天统计量固定为0.01

  • 插线板固件版本 2.1.8_0007&2.1.8_0005
  • HA插件版本 v0.6.11
@Jeremy-Merle
Copy link
Author

经过测试,在HA中禁用CP5Pro后,米家APP中电量统计可继续更新。

@al-one
Copy link
Owner

al-one commented Aug 30, 2022

请尝试为该设备添加自定义选项:exclude_miot_properties: power_consumption

@Jeremy-Merle
Copy link
Author

Jeremy-Merle commented Aug 30, 2022

目前尝试了以下几种方案

  1. 账号集成-本地模式;添加自定义选项 exclude_miot_properties: power_consumption ——功耗统计无法更新
    添加自定义选项后的状态
    cuco.plug.cp5pro:
      sensor_properties: voltage,electric_current
      sensor_attributes: power_cost_today,power_cost_month
      main_miot_services: switch-2
      stat_power_cost_key: '10.1'
      exclude_miot_properties: power_consumption
    
    设备面板中 power_consumption 传感器显示被禁用(可能是自定义选项生效后未手动删除)
  2. 账号集成-本地模式;手动禁用 CP5Pro 设备中的所有传感器——功耗统计无法更新
  3. 账号集成-云端模式;——功耗统计正常更新
    无需其他设置,设备面板中 power_consumption 传感器未被禁用但不更新,值为0,功耗统计可以正常更新

@al-one
Copy link
Owner

al-one commented Sep 13, 2022

根据 @F-TD5X 的描述,该设备在回去电量相关属性的时候会清除设备自身存储的数据,因此导致无法同步到小米云端。另外获取电量相关属性会导致设备重启,我会排除规格中power_consumption服务,请更新至master分支后再观察。

@Jeremy-Merle
Copy link
Author

非常感谢开发者对此问题的持续支持,目前更新到v0.6.13版本后功耗统计正常(本地模式和云端模式均正常可用),功率统计无法使用。但是在v0.6.11版本中使用云端模式可同时支持功耗统计和功率统计,所以能否将功率统计功能单独在本地模式下禁用,而保留云端模式的全部功能。

@al-one
Copy link
Owner

al-one commented Dec 14, 2022

暂时无法在本地/云端下分别为设备添加自定义选项,可以尝试排除power_consumption服务下除了功率意外的其他属性。

# configuration.yaml
xiaomi_miot:
  device_customizes:
    cuco.plug.cp5pro:
      exclude_miot_services: device_setting,use_ele_alert
      exclude_miot_properties: power_consumption,electric_current,voltage

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

2 participants