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

[Bug]: 电量统计类设备缺少属性、数值异常 #30

Closed
DoraTiger opened this issue Dec 16, 2024 · 0 comments
Closed

[Bug]: 电量统计类设备缺少属性、数值异常 #30

DoraTiger opened this issue Dec 16, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@DoraTiger
Copy link
Contributor

DoraTiger commented Dec 16, 2024

Describe the bug / 描述问题

电量统计类设备缺少属性

To Reproduce / 复现步骤

电量燃气等统计类设备属性要求参考 HA官方troubleshooting-missing-entities

  • 1.任意包含电功率统计的设备,状态关键字为electric_power,比如零火开关,智能插座,第三方智能电闸,只有三个数据:"unit_of_measurement","icon","friendly_name",无法被能源模块识别为有效实体。缺少“state_class”,“device_class”。
现有参数:
unit_of_measurement: W
icon: mdi:flash-triangle
friendly_name: ***********

需要额外的以下参数:
state_class: measurement
device_class: power
  • 2.任意包含累计功耗的设备,状态关键字为power_consumption或total_battery,比如零火开关,智能插座,空调,第三方智能电闸,参数不一致,米家官方设备仅有"friendly_name",丢失基本功率单位“unit_of_measurement”的kWh,第三方设备比如浦安达智能电闸,只有"unit_of_measurement","icon","friendly_name",参数缺少,无法被能源模块有效识别。
开关现有参数:
friendly_name: 厨房三开开关  功耗参数 耗电量

空调现有参数:
friendly_name: 客厅空调  功耗参数 耗电量

电闸现有参数:
unit_of_measurement: kWh
icon: mdi:transmission-tower
friendly_name: 浦安达单相智能保护电闸  功耗参数 耗电量

缺失参数:
state_class: total_increasing 
unit_of_measurement: kWh 
device_class: energy
  • 3.任意包含电压统计的设备,状态关键字为voltage,比如第三方智能电闸,只有三个数据:"unit_of_measurement","device_class","friendly_name",无法被能源模块识别为有效实体。缺少“state_class”,同时统计数据单位存在问题,数值转换错了单位,238v电压,被识别成238mV。
现有参数:
unit_of_measurement: mV 
device_class: voltage 
friendly_name: 浦安达单相智能保护电闸  功耗参数 电压

缺失参数:
state_class: measurement
  • 4.任意包含电流统计的设备,状态关键字为electric_current,比如第三方智能电闸,仅有"friendly_name",丢失基本功率单位“unit_of_measurement”的A,同时缺少“state_class”,“device_class”。
现有参数:
friendly_name: 浦安达单相智能保护电闸  功耗参数 电流

缺少参数:
state_class: measurement
unit_of_measurement: A
device_class: current

Expected behavior / 预期结果

能源模块正确识别,单位显示正确,数据输出正确

Home Assistant Logs / 系统日志

No response

Home Assistant Core version / Home Assistant Core 版本

2024.12.3

Home Assistant Operation System version / Home Assistant Operation System 版本

docker部署,无OS

Xiaomi Home integration version / 米家集成版本

v0.1.0

Additional context / 其他说明

No response

@DoraTiger DoraTiger added the bug Something isn't working label Dec 16, 2024
@DoraTiger DoraTiger changed the title [Bug]: [Bug]: 电量统计类设备缺少属性 Dec 16, 2024
@DoraTiger DoraTiger changed the title [Bug]: 电量统计类设备缺少属性 [Bug]: 电量统计类设备缺少属性、数值异常 Dec 16, 2024
@topsworld topsworld self-assigned this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants