Add and use frequency constants (#34113)

This commit is contained in:
springstan 2020-04-12 22:44:31 +02:00 committed by GitHub
parent 00b6409b76
commit 19dd797dfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 29 additions and 14 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,
FREQUENCY_HERTZ,
LENGTH_METERS,
MASS_KILOGRAMS,
POWER_WATT,
@ -36,7 +37,7 @@ SENSORS = {
"V_VOLUME": ["", None],
"V_LEVEL": {
"S_SOUND": ["dB", "mdi:volume-high"],
"S_VIBRATION": ["Hz", None],
"S_VIBRATION": [FREQUENCY_HERTZ, None],
"S_LIGHT_LEVEL": ["lx", "mdi:white-balance-sunny"],
},
"V_VOLTAGE": [UNIT_VOLT, "mdi:flash"],