Use LENGTH_METERS constant (#34110)

This commit is contained in:
springstan 2020-04-12 21:44:56 +02:00 committed by GitHub
parent 538bb60022
commit 00b6409b76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 57 additions and 18 deletions

View file

@ -3,6 +3,7 @@ from homeassistant.components import mysensors
from homeassistant.components.sensor import DOMAIN
from homeassistant.const import (
ENERGY_KILO_WATT_HOUR,
LENGTH_METERS,
MASS_KILOGRAMS,
POWER_WATT,
TEMP_CELSIUS,
@ -26,12 +27,12 @@ SENSORS = {
"V_GUST": [None, "mdi:weather-windy"],
"V_DIRECTION": [UNIT_DEGREE, "mdi:compass"],
"V_WEIGHT": [MASS_KILOGRAMS, "mdi:weight-kilogram"],
"V_DISTANCE": ["m", "mdi:ruler"],
"V_DISTANCE": [LENGTH_METERS, "mdi:ruler"],
"V_IMPEDANCE": ["ohm", None],
"V_WATT": [POWER_WATT, None],
"V_KWH": [ENERGY_KILO_WATT_HOUR, None],
"V_LIGHT_LEVEL": [UNIT_PERCENTAGE, "mdi:white-balance-sunny"],
"V_FLOW": ["m", "mdi:gauge"],
"V_FLOW": [LENGTH_METERS, "mdi:gauge"],
"V_VOLUME": ["", None],
"V_LEVEL": {
"S_SOUND": ["dB", "mdi:volume-high"],