Use core constants for greeneye_monitor (#46238)

This commit is contained in:
tkdrob 2021-02-08 16:53:46 -05:00 committed by GitHub
parent c2302784c2
commit 6b340415b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -7,6 +7,8 @@ import voluptuous as vol
from homeassistant.const import (
CONF_NAME,
CONF_PORT,
CONF_SENSOR_TYPE,
CONF_SENSORS,
CONF_TEMPERATURE_UNIT,
EVENT_HOMEASSISTANT_STOP,
TIME_HOURS,
@ -27,8 +29,6 @@ CONF_NET_METERING = "net_metering"
CONF_NUMBER = "number"
CONF_PULSE_COUNTERS = "pulse_counters"
CONF_SERIAL_NUMBER = "serial_number"
CONF_SENSORS = "sensors"
CONF_SENSOR_TYPE = "sensor_type"
CONF_TEMPERATURE_SENSORS = "temperature_sensors"
CONF_TIME_UNIT = "time_unit"
CONF_VOLTAGE_SENSORS = "voltage"
@ -119,7 +119,6 @@ CONFIG_SCHEMA = vol.Schema({DOMAIN: COMPONENT_SCHEMA}, extra=vol.ALLOW_EXTRA)
async def async_setup(hass, config):
"""Set up the GreenEye Monitor component."""
monitors = Monitors()
hass.data[DATA_GREENEYE_MONITOR] = monitors

View file

@ -1,6 +1,7 @@
"""Support for the sensors in a GreenEye Monitor."""
from homeassistant.const import (
CONF_NAME,
CONF_SENSOR_TYPE,
CONF_TEMPERATURE_UNIT,
POWER_WATT,
TIME_HOURS,
@ -16,7 +17,6 @@ from . import (
CONF_MONITOR_SERIAL_NUMBER,
CONF_NET_METERING,
CONF_NUMBER,
CONF_SENSOR_TYPE,
CONF_TIME_UNIT,
DATA_GREENEYE_MONITOR,
SENSOR_TYPE_CURRENT,