mirror of
https://github.com/home-assistant/core.git
synced 2025-12-06 07:58:08 +00:00
committed by
Daniel Høyer Iversen
parent
e55ce61100
commit
ed2b9e5483
@@ -3,6 +3,7 @@ from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from homeassistant.components.sense import SENSE_DATA
|
||||
from homeassistant.const import POWER_WATT
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
@@ -90,7 +91,7 @@ class Sense(Entity):
|
||||
self._state = None
|
||||
|
||||
if sensor_type == ACTIVE_TYPE:
|
||||
self._unit_of_measurement = 'W'
|
||||
self._unit_of_measurement = POWER_WATT
|
||||
else:
|
||||
self._unit_of_measurement = 'kWh'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user