Use UnitOfPower in integrations [a-g] (#83812)

This commit is contained in:
epenet 2022-12-12 11:48:09 +01:00 committed by GitHub
parent 431df618c3
commit 4fe025b297
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 88 additions and 91 deletions

View file

@ -21,8 +21,8 @@ from homeassistant.const import (
CONF_UNIT_OF_MEASUREMENT,
CONF_URL,
CONF_VALUE_TEMPLATE,
POWER_WATT,
STATE_UNKNOWN,
UnitOfPower,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers import template
@ -46,7 +46,7 @@ CONF_ONLY_INCLUDE_FEEDID = "include_only_feed_id"
CONF_SENSOR_NAMES = "sensor_names"
DECIMALS = 2
DEFAULT_UNIT = POWER_WATT
DEFAULT_UNIT = UnitOfPower.WATT
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=5)
ONLY_INCL_EXCL_NONE = "only_include_exclude_or_none"