Drop UNIT_ prefix for constants (#34164)

* Drop UNIT_ prefix for VOLT

* Drop UNIT_ prefix for DEGREE

* Drop UNIT_ prefix for CONDUCTIVITY

* Drop UNIT_ prefix for UV_INDEX

* Run isort
This commit is contained in:
springstan authored and GitHub committed 2020-04-21 19:45:53 +02:00
1 parent fbde040f59
commit ef9d9b17bd
42 files changed
+170 -196

No files matched your search

+2 -2
View File
@@ -7,9 +7,9 @@ from homeassistant.components.demo.sensor import DemoSensor
import homeassistant.components.prometheus as prometheus
from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
DEGREE,
DEVICE_CLASS_POWER,
ENERGY_KILO_WATT_HOUR,
UNIT_DEGREE,
)
from homeassistant.setup import async_setup_component
@@ -48,7 +48,7 @@ async def prometheus_client(loop, hass, hass_client):
sensor3.entity_id = "sensor.electricity_price"
await sensor3.async_update_ha_state()
sensor4 = DemoSensor(None, "Wind Direction", 25, None, UNIT_DEGREE, None)
sensor4 = DemoSensor(None, "Wind Direction", 25, None, DEGREE, None)
sensor4.hass = hass
sensor4.entity_id = "sensor.wind_direction"
await sensor4.async_update_ha_state()