Centrally define Watt (#21570)

* centralize Watt definition

* lint
This commit is contained in:
Diogo Gomes 2019-03-02 10:29:59 +00:00 committed by Daniel Høyer Iversen
parent e55ce61100
commit ed2b9e5483
26 changed files with 70 additions and 58 deletions

View file

@ -5,7 +5,8 @@ from typing import Callable
from homeassistant.components.isy994 import (
ISY994_NODES, ISY994_WEATHER, ISYDevice)
from homeassistant.components.sensor import DOMAIN
from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT, UNIT_UV_INDEX
from homeassistant.const import (
TEMP_CELSIUS, TEMP_FAHRENHEIT, UNIT_UV_INDEX, POWER_WATT)
from homeassistant.helpers.typing import ConfigType
_LOGGER = logging.getLogger(__name__)
@ -75,7 +76,7 @@ UOM_FRIENDLY_NAME = {
'69': 'gal',
'71': UNIT_UV_INDEX,
'72': 'V',
'73': 'W',
'73': POWER_WATT,
'74': 'W/m²',
'75': 'weekday',
'76': 'Wind Direction (°)',