mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-04-02 07:45:31 +08:00
feat: add power properties trans (#571)
This commit is contained in:
parent
e0eb06144f
commit
1cdcb785b5
@ -431,6 +431,14 @@ SPEC_PROP_TRANS_MAP: dict[str, dict | str] = {
|
|||||||
'unit_of_measurement': UnitOfEnergy.KILO_WATT_HOUR
|
'unit_of_measurement': UnitOfEnergy.KILO_WATT_HOUR
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'power': {
|
||||||
|
'device_class': SensorDeviceClass.POWER,
|
||||||
|
'entity': 'sensor',
|
||||||
|
'optional': {
|
||||||
|
'state_class': SensorStateClass.MEASUREMENT,
|
||||||
|
'unit_of_measurement': UnitOfPower.WATT
|
||||||
|
}
|
||||||
|
},
|
||||||
'total-battery': {
|
'total-battery': {
|
||||||
'device_class': SensorDeviceClass.ENERGY,
|
'device_class': SensorDeviceClass.ENERGY,
|
||||||
'entity': 'sensor',
|
'entity': 'sensor',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user