diff --git a/homeassistant/components/water_heater/demo.py b/homeassistant/components/water_heater/demo.py index a0220927f16..b551993aca5 100644 --- a/homeassistant/components/water_heater/demo.py +++ b/homeassistant/components/water_heater/demo.py @@ -1,4 +1,4 @@ -"""Demo platform that offers a fake water_heater device.""" +"""Demo platform that offers a fake water heater device.""" from homeassistant.components.water_heater import ( WaterHeaterDevice, SUPPORT_TARGET_TEMPERATURE, diff --git a/homeassistant/components/weather/__init__.py b/homeassistant/components/weather/__init__.py index d479725657b..34cd86347f2 100644 --- a/homeassistant/components/weather/__init__.py +++ b/homeassistant/components/weather/__init__.py @@ -1,18 +1,13 @@ -""" -Weather component that handles meteorological data for your location. - -For more details about this component, please refer to the documentation at -https://home-assistant.io/components/weather/ -""" +"""Weather component that handles meteorological data for your location.""" from datetime import timedelta import logging -from homeassistant.helpers.entity_component import EntityComponent -from homeassistant.helpers.temperature import display_temp as show_temp -from homeassistant.const import PRECISION_WHOLE, PRECISION_TENTHS, TEMP_CELSIUS +from homeassistant.const import PRECISION_TENTHS, PRECISION_WHOLE, TEMP_CELSIUS from homeassistant.helpers.config_validation import ( # noqa PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE) from homeassistant.helpers.entity import Entity +from homeassistant.helpers.entity_component import EntityComponent +from homeassistant.helpers.temperature import display_temp as show_temp _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/weather/bom.py b/homeassistant/components/weather/bom.py index 1ed54496c6f..b05d5fc594d 100644 --- a/homeassistant/components/weather/bom.py +++ b/homeassistant/components/weather/bom.py @@ -1,20 +1,15 @@ -""" -Support for Australian BOM (Bureau of Meteorology) weather service. - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/weather.bom/ -""" +"""Support for Australian BOM (Bureau of Meteorology) weather service.""" import logging import voluptuous as vol -from homeassistant.components.weather import WeatherEntity, PLATFORM_SCHEMA -from homeassistant.const import \ - CONF_NAME, TEMP_CELSIUS, CONF_LATITUDE, CONF_LONGITUDE -from homeassistant.helpers import config_validation as cv # Reuse data and API logic from the sensor implementation -from homeassistant.components.sensor.bom import \ - BOMCurrentData, closest_station, CONF_STATION, validate_station +from homeassistant.components.sensor.bom import ( + CONF_STATION, BOMCurrentData, closest_station, validate_station) +from homeassistant.components.weather import PLATFORM_SCHEMA, WeatherEntity +from homeassistant.const import ( + CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, TEMP_CELSIUS) +from homeassistant.helpers import config_validation as cv _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/weather/buienradar.py b/homeassistant/components/weather/buienradar.py index 1ec3fc513e9..31f51824146 100644 --- a/homeassistant/components/weather/buienradar.py +++ b/homeassistant/components/weather/buienradar.py @@ -1,22 +1,16 @@ -""" -Support for Buienradar.nl weather service. - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/weather.buienradar/ -""" +"""Support for Buienradar.nl weather service.""" import logging import voluptuous as vol -from homeassistant.components.weather import ( - WeatherEntity, PLATFORM_SCHEMA, ATTR_FORECAST_CONDITION, - ATTR_FORECAST_TEMP, ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_TIME) -from homeassistant.const import \ - CONF_NAME, TEMP_CELSIUS, CONF_LATITUDE, CONF_LONGITUDE -from homeassistant.helpers import config_validation as cv # Reuse data and API logic from the sensor implementation -from homeassistant.components.sensor.buienradar import ( - BrData) +from homeassistant.components.sensor.buienradar import BrData +from homeassistant.components.weather import ( + ATTR_FORECAST_CONDITION, ATTR_FORECAST_TEMP, ATTR_FORECAST_TEMP_LOW, + ATTR_FORECAST_TIME, PLATFORM_SCHEMA, WeatherEntity) +from homeassistant.const import ( + CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, TEMP_CELSIUS) +from homeassistant.helpers import config_validation as cv REQUIREMENTS = ['buienradar==0.91'] diff --git a/homeassistant/components/weather/darksky.py b/homeassistant/components/weather/darksky.py index 4ac3d2a1d22..17e3cbbcf14 100644 --- a/homeassistant/components/weather/darksky.py +++ b/homeassistant/components/weather/darksky.py @@ -1,9 +1,4 @@ -""" -Platform for retrieving meteorological data from Dark Sky. - -For more details about this platform, please refer to the documentation -https://home-assistant.io/components/weather.darksky/ -""" +"""Support for retrieving meteorological data from Dark Sky.""" from datetime import datetime, timedelta import logging @@ -12,13 +7,12 @@ from requests.exceptions import ( import voluptuous as vol from homeassistant.components.weather import ( - ATTR_FORECAST_TEMP, ATTR_FORECAST_TIME, ATTR_FORECAST_CONDITION, - ATTR_FORECAST_WIND_SPEED, ATTR_FORECAST_WIND_BEARING, - ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_PRECIPITATION, - PLATFORM_SCHEMA, WeatherEntity) + ATTR_FORECAST_CONDITION, ATTR_FORECAST_PRECIPITATION, ATTR_FORECAST_TEMP, + ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_TIME, ATTR_FORECAST_WIND_BEARING, + ATTR_FORECAST_WIND_SPEED, PLATFORM_SCHEMA, WeatherEntity) from homeassistant.const import ( - CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, TEMP_CELSIUS, - CONF_MODE, TEMP_FAHRENHEIT) + CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_MODE, CONF_NAME, + TEMP_CELSIUS, TEMP_FAHRENHEIT) import homeassistant.helpers.config_validation as cv from homeassistant.util import Throttle diff --git a/homeassistant/components/weather/demo.py b/homeassistant/components/weather/demo.py index 6bcb8918504..d20e91b1f93 100644 --- a/homeassistant/components/weather/demo.py +++ b/homeassistant/components/weather/demo.py @@ -1,15 +1,10 @@ -""" -Demo platform that offers fake meteorological data. - -For more details about this platform, please refer to the documentation -https://home-assistant.io/components/demo/ -""" +"""Demo platform that offers fake meteorological data.""" from datetime import datetime, timedelta from homeassistant.components.weather import ( - WeatherEntity, ATTR_FORECAST_CONDITION, ATTR_FORECAST_PRECIPITATION, - ATTR_FORECAST_TEMP, ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_TIME) -from homeassistant.const import (TEMP_CELSIUS, TEMP_FAHRENHEIT) + ATTR_FORECAST_CONDITION, ATTR_FORECAST_PRECIPITATION, ATTR_FORECAST_TEMP, + ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_TIME, WeatherEntity) +from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT CONDITION_CLASSES = { 'cloudy': [], diff --git a/homeassistant/components/weather/met.py b/homeassistant/components/weather/met.py index c905e6b6ce3..90978314a20 100644 --- a/homeassistant/components/weather/met.py +++ b/homeassistant/components/weather/met.py @@ -1,21 +1,16 @@ -""" -Support for Met.no weather service. - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/weather.met/ -""" +"""Support for Met.no weather service.""" import logging from random import randrange import voluptuous as vol from homeassistant.components.weather import PLATFORM_SCHEMA, WeatherEntity -from homeassistant.const import (CONF_ELEVATION, CONF_LATITUDE, CONF_LONGITUDE, - CONF_NAME, TEMP_CELSIUS) +from homeassistant.const import ( + CONF_ELEVATION, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, TEMP_CELSIUS) from homeassistant.helpers import config_validation as cv from homeassistant.helpers.aiohttp_client import async_get_clientsession -from homeassistant.helpers.event import (async_track_utc_time_change, - async_call_later) +from homeassistant.helpers.event import ( + async_call_later, async_track_utc_time_change) import homeassistant.util.dt as dt_util REQUIREMENTS = ['pyMetno==0.4.5'] diff --git a/homeassistant/components/weather/meteo_france.py b/homeassistant/components/weather/meteo_france.py index a9d11d198f6..cf8b2b497fb 100644 --- a/homeassistant/components/weather/meteo_france.py +++ b/homeassistant/components/weather/meteo_france.py @@ -1,19 +1,12 @@ -""" -Support for Meteo france weather service. - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/weather.meteo_france/ -""" -import logging +"""Support for Meteo france weather service.""" from datetime import datetime, timedelta +import logging -from homeassistant.components.meteo_france import (DATA_METEO_FRANCE, - CONDITION_CLASSES, - CONF_CITY, - ATTRIBUTION) +from homeassistant.components.meteo_france import ( + ATTRIBUTION, CONDITION_CLASSES, CONF_CITY, DATA_METEO_FRANCE) from homeassistant.components.weather import ( - WeatherEntity, ATTR_FORECAST_CONDITION, - ATTR_FORECAST_TEMP, ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_TIME) + ATTR_FORECAST_CONDITION, ATTR_FORECAST_TEMP, ATTR_FORECAST_TEMP_LOW, + ATTR_FORECAST_TIME, WeatherEntity) from homeassistant.const import TEMP_CELSIUS _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/weather/metoffice.py b/homeassistant/components/weather/metoffice.py index 7382319e7a4..14738980482 100644 --- a/homeassistant/components/weather/metoffice.py +++ b/homeassistant/components/weather/metoffice.py @@ -1,9 +1,4 @@ -""" -Support for UK Met Office weather service. - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/weather.metoffice/ -""" +"""Support for UK Met Office weather service.""" import logging import voluptuous as vol diff --git a/homeassistant/components/weather/openweathermap.py b/homeassistant/components/weather/openweathermap.py index 2b86359361a..2100cf169b6 100644 --- a/homeassistant/components/weather/openweathermap.py +++ b/homeassistant/components/weather/openweathermap.py @@ -1,9 +1,4 @@ -""" -Support for the OpenWeatherMap (OWM) service. - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/weather.openweathermap/ -""" +"""Support for the OpenWeatherMap (OWM) service.""" from datetime import timedelta import logging @@ -11,12 +6,11 @@ import voluptuous as vol from homeassistant.components.weather import ( ATTR_FORECAST_CONDITION, ATTR_FORECAST_PRECIPITATION, ATTR_FORECAST_TEMP, - ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_TIME, ATTR_FORECAST_WIND_SPEED, - ATTR_FORECAST_WIND_BEARING, - PLATFORM_SCHEMA, WeatherEntity) + ATTR_FORECAST_TEMP_LOW, ATTR_FORECAST_TIME, ATTR_FORECAST_WIND_BEARING, + ATTR_FORECAST_WIND_SPEED, PLATFORM_SCHEMA, WeatherEntity) from homeassistant.const import ( - CONF_API_KEY, TEMP_CELSIUS, CONF_LATITUDE, CONF_LONGITUDE, CONF_MODE, - CONF_NAME, STATE_UNKNOWN) + CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_MODE, CONF_NAME, + STATE_UNKNOWN, TEMP_CELSIUS) import homeassistant.helpers.config_validation as cv from homeassistant.util import Throttle diff --git a/homeassistant/components/weather/yweather.py b/homeassistant/components/weather/yweather.py index 567b8e235a8..e4eb34a039a 100644 --- a/homeassistant/components/weather/yweather.py +++ b/homeassistant/components/weather/yweather.py @@ -1,9 +1,4 @@ -""" -Support for the Yahoo! Weather service. - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/weather.yweather/ -""" +"""Support for the Yahoo! Weather service.""" from datetime import timedelta import logging diff --git a/homeassistant/components/weather/zamg.py b/homeassistant/components/weather/zamg.py index f76b733ef0b..60707fa5e30 100644 --- a/homeassistant/components/weather/zamg.py +++ b/homeassistant/components/weather/zamg.py @@ -1,23 +1,18 @@ -""" -Sensor for data from Austrian "Zentralanstalt für Meteorologie und Geodynamik". - -For more details about this platform, please refer to the documentation at -https://home-assistant.io/components/weather.zamg/ -""" +"""Sensor for data from Austrian Zentralanstalt für Meteorologie.""" import logging import voluptuous as vol -from homeassistant.components.weather import ( - WeatherEntity, ATTR_WEATHER_HUMIDITY, ATTR_WEATHER_PRESSURE, - ATTR_WEATHER_TEMPERATURE, ATTR_WEATHER_WIND_BEARING, - ATTR_WEATHER_WIND_SPEED, PLATFORM_SCHEMA) -from homeassistant.const import ( - CONF_NAME, TEMP_CELSIUS, CONF_LATITUDE, CONF_LONGITUDE) -from homeassistant.helpers import config_validation as cv # Reuse data and API logic from the sensor implementation from homeassistant.components.sensor.zamg import ( - ATTRIBUTION, closest_station, CONF_STATION_ID, zamg_stations, ZamgData) + ATTRIBUTION, CONF_STATION_ID, ZamgData, closest_station, zamg_stations) +from homeassistant.components.weather import ( + ATTR_WEATHER_HUMIDITY, ATTR_WEATHER_PRESSURE, ATTR_WEATHER_TEMPERATURE, + ATTR_WEATHER_WIND_BEARING, ATTR_WEATHER_WIND_SPEED, PLATFORM_SCHEMA, + WeatherEntity) +from homeassistant.const import ( + CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, TEMP_CELSIUS) +from homeassistant.helpers import config_validation as cv _LOGGER = logging.getLogger(__name__)