Use POWER_WATT constant (#33984)
This commit is contained in:
1 parent
2ab79115d1
commit
f839ba00eb
14 files changed
+56
-35
No files matched your search
@@ -5,6 +5,7 @@ import logging
|
||||
|
||||
import aiohttp
|
||||
|
||||
from homeassistant.const import POWER_WATT
|
||||
from homeassistant.exceptions import PlatformNotReady
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle, dt as dt_util
|
||||
@@ -194,7 +195,7 @@ class TibberSensorRT(TibberSensor):
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
"""Return the unit of measurement of this entity."""
|
||||
return "W"
|
||||
return POWER_WATT
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
|
||||
Reference in new issue
Block a user