Skip to content

Commit

Permalink
feature: add power device class to power limit and consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
UpstreamData committed Jan 7, 2025
1 parent ed05c3b commit de28e24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 41 deletions.
2 changes: 2 additions & 0 deletions custom_components/miner/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@
key="Power Limit",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
entity_category=EntityCategory.DIAGNOSTIC,
),
"miner_consumption": SensorEntityDescription(
key="Miner Consumption",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfPower.WATT,
device_class=SensorDeviceClass.POWER,
entity_category=EntityCategory.DIAGNOSTIC,
),
"efficiency": SensorEntityDescription(
Expand Down
52 changes: 11 additions & 41 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit de28e24

Please sign in to comment.