Skip to content

Commit

Permalink
feat: add power properties trans (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
juzi214032 authored Jan 14, 2025
1 parent e0eb061 commit 1cdcb78
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions custom_components/xiaomi_home/miot/specs/specv2entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,14 @@
'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': {
'device_class': SensorDeviceClass.ENERGY,
'entity': 'sensor',
Expand Down

0 comments on commit 1cdcb78

Please sign in to comment.