Skip to content

Commit

Permalink
Use kWh unit for TotalTariff (#290)
Browse files Browse the repository at this point in the history
* Use kWh unit for TotalTariff

* Use kWh unit for TotalTariff

---------

Co-authored-by: a.obitskyi <{ID}+{username}@users.noreply.github.com>
  • Loading branch information
SqrTT and a.obitskyi authored Jun 27, 2024
1 parent 7d381a8 commit 65bbf56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions hatasmota/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
SENSOR_VOLTAGE: Final = "Voltage"
SENSOR_WEIGHT: Final = "Weight"
SENSOR_YESTERDAY: Final = "Yesterday"
SENSOR_TOTAL_TARIFF: Final = "TotalTariff"

SENSOR_STATUS_BATTERY_PERCENTAGE: Final = "status_battery_percentage"

Expand Down
2 changes: 2 additions & 0 deletions hatasmota/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
SENSOR_VOLTAGE,
SENSOR_WEIGHT,
SENSOR_YESTERDAY,
SENSOR_TOTAL_TARIFF,
SPEED_FEET_PER_SECOND,
SPEED_KILOMETERS_PER_HOUR,
SPEED_KNOT,
Expand Down Expand Up @@ -198,6 +199,7 @@
SENSOR_VOLTAGE: VOLT,
SENSOR_WEIGHT: MASS_KILOGRAMS,
SENSOR_YESTERDAY: ENERGY_KILO_WATT_HOUR,
SENSOR_TOTAL_TARIFF: ENERGY_KILO_WATT_HOUR,
}

SUPPORTED_PRESSURE_UNITS = [PRESSURE_HPA, PRESSURE_MMHG]
Expand Down

0 comments on commit 65bbf56

Please sign in to comment.