Use existing constant (#18408)

This commit is contained in:
Fabian Affolter 2018-11-12 22:32:30 +01:00 committed by GitHub
parent 0ab81b03a8
commit ea4480f170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,19 +5,18 @@ For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/weather.ecobee/ https://home-assistant.io/components/weather.ecobee/
""" """
from datetime import datetime from datetime import datetime
from homeassistant.components import ecobee from homeassistant.components import ecobee
from homeassistant.components.weather import ( from homeassistant.components.weather import (
WeatherEntity, ATTR_FORECAST_CONDITION, ATTR_FORECAST_TEMP, ATTR_FORECAST_CONDITION, ATTR_FORECAST_TEMP, ATTR_FORECAST_TEMP_LOW,
ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_TIME) ATTR_FORECAST_TIME, ATTR_FORECAST_WIND_SPEED, WeatherEntity)
from homeassistant.const import (TEMP_FAHRENHEIT) from homeassistant.const import TEMP_FAHRENHEIT
DEPENDENCIES = ['ecobee'] DEPENDENCIES = ['ecobee']
ATTR_FORECAST_TEMP_HIGH = 'temphigh' ATTR_FORECAST_TEMP_HIGH = 'temphigh'
ATTR_FORECAST_PRESSURE = 'pressure' ATTR_FORECAST_PRESSURE = 'pressure'
ATTR_FORECAST_VISIBILITY = 'visibility' ATTR_FORECAST_VISIBILITY = 'visibility'
ATTR_FORECAST_WIND_SPEED = 'windspeed'
ATTR_FORECAST_HUMIDITY = 'humidity' ATTR_FORECAST_HUMIDITY = 'humidity'
MISSING_DATA = -5002 MISSING_DATA = -5002
@ -41,7 +40,7 @@ class EcobeeWeather(WeatherEntity):
"""Representation of Ecobee weather data.""" """Representation of Ecobee weather data."""
def __init__(self, name, index): def __init__(self, name, index):
"""Initialize the sensor.""" """Initialize the Ecobee weather platform."""
self._name = name self._name = name
self._index = index self._index = index
self.weather = None self.weather = None