Add new electrical unit constants (mV + mA) (#53158)

This commit is contained in:
Marc Mueller 2021-07-20 15:57:11 +02:00 committed by GitHub
parent 08f03c95d2
commit c578541a82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 23 deletions

View file

@ -6,6 +6,7 @@ from homeassistant.const import (
DEVICE_CLASS_BATTERY,
DEVICE_CLASS_TEMPERATURE,
DEVICE_CLASS_TIMESTAMP,
ELECTRIC_POTENTIAL_MILLIVOLT,
PERCENTAGE,
TEMP_CELSIUS,
)
@ -15,7 +16,7 @@ from .const import ATTRIBUTION, DOMAIN
SENSORS = {
"Chlorine": {
"unit": "mV",
"unit": ELECTRIC_POTENTIAL_MILLIVOLT,
"icon": "mdi:pool",
"name": "Chlorine",
"device_class": None,
@ -40,13 +41,13 @@ SENSORS = {
"device_class": DEVICE_CLASS_TIMESTAMP,
},
"Chlorine High": {
"unit": "mV",
"unit": ELECTRIC_POTENTIAL_MILLIVOLT,
"icon": "mdi:pool",
"name": "Chlorine High",
"device_class": None,
},
"Chlorine Low": {
"unit": "mV",
"unit": ELECTRIC_POTENTIAL_MILLIVOLT,
"icon": "mdi:pool",
"name": "Chlorine Low",
"device_class": None,