Use list literals (#33659)

This commit is contained in:
springstan authored and GitHub committed 2020-04-04 23:14:47 +02:00
1 parent dde93304d3
commit db72039b8f
14 files changed
+18 -18

No files matched your search

@@ -10,7 +10,7 @@ from .const import _LOGGER, DOMAIN, ECOBEE_MODEL_TO_NAME, MANUFACTURER
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up ecobee binary (occupancy) sensors."""
data = hass.data[DOMAIN]
dev = list()
dev = []
for index in range(len(data.ecobee.thermostats)):
for sensor in data.ecobee.get_remote_sensors(index):
for item in sensor["capability"]:
+1 -1
View File
@@ -20,7 +20,7 @@ SENSOR_TYPES = {
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up ecobee (temperature and humidity) sensors."""
data = hass.data[DOMAIN]
dev = list()
dev = []
for index in range(len(data.ecobee.thermostats)):
for sensor in data.ecobee.get_remote_sensors(index):
for item in sensor["capability"]:
+2 -2
View File
@@ -26,7 +26,7 @@ from .const import (
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the ecobee weather platform."""
data = hass.data[DOMAIN]
dev = list()
dev = []
for index in range(len(data.ecobee.thermostats)):
thermostat = data.ecobee.get_thermostat(index)
if "weather" in thermostat:
@@ -164,7 +164,7 @@ class EcobeeWeather(WeatherEntity):
if "forecasts" not in self.weather:
return None
forecasts = list()
forecasts = []
for day in range(1, 5):
forecast = _process_forecast(self.weather["forecasts"][day])
if forecast is None: