Use pressure constants in code base (#40262)

This commit is contained in:
springstan authored and GitHub committed 2020-09-19 09:26:08 +02:00
1 parent f563068ce6
commit e330468a13
17 files changed
+56 -30

No files matched your search

@@ -6,7 +6,13 @@ import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_DISPLAY_OPTIONS, CONF_NAME, TEMP_CELSIUS, VOLT
from homeassistant.const import (
CONF_DISPLAY_OPTIONS,
CONF_NAME,
PRESSURE_HPA,
TEMP_CELSIUS,
VOLT,
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
@@ -30,7 +36,7 @@ SENSOR_TYPES = {
"magnetometer_y": ["magnetometer_y", " ", "mdi:magnet"],
"magnetometer_z": ["magnetometer_z", " ", "mdi:magnet"],
"temperature": ["temperature", TEMP_CELSIUS, "mdi:thermometer"],
"pressure": ["pressure", "hPa", "mdi:gauge"],
"pressure": ["pressure", PRESSURE_HPA, "mdi:gauge"],
"voltage_0": ["voltage_0", VOLT, "mdi:flash"],
"voltage_1": ["voltage_1", VOLT, "mdi:flash"],
"voltage_2": ["voltage_2", VOLT, "mdi:flash"],