Skip to content

Commit

Permalink
add efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
Schnitzel committed Nov 16, 2023
1 parent 55528f5 commit e67f559
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/miner/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ async def _async_update_data(self):
"temperature": miner_data.temperature_avg,
"power_limit": miner_data.wattage_limit,
"miner_consumption": miner_data.wattage,
"efficiency": miner_data.efficiency,
},
"board_sensors": {
board.slot: {
Expand Down
6 changes: 6 additions & 0 deletions custom_components/miner/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ class MinerNumberEntityDescription(SensorEntityDescription):
native_unit_of_measurement=POWER_WATT,
device_class=SensorDeviceClass.POWER,
),
"efficiency": MinerSensorEntityDescription(
"Efficiency",
native_unit_of_measurement="W/Ths",
state_class=SensorStateClass.MEASUREMENT,
device_class="Efficiency",
),
}


Expand Down

0 comments on commit e67f559

Please sign in to comment.