mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix PyLint 1.6 issues (#2471)
This commit is contained in:
parent
978ebb9c59
commit
31b8e49ad2
@ -89,7 +89,7 @@ class WelcomeData(object):
|
|||||||
"""Return all module available on the API as a list."""
|
"""Return all module available on the API as a list."""
|
||||||
self.update()
|
self.update()
|
||||||
if not self.home:
|
if not self.home:
|
||||||
for home in self.welcomedata.cameras.keys():
|
for home in self.welcomedata.cameras:
|
||||||
for camera in self.welcomedata.cameras[home].values():
|
for camera in self.welcomedata.cameras[home].values():
|
||||||
self.camera_names.append(camera['name'])
|
self.camera_names.append(camera['name'])
|
||||||
else:
|
else:
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"""Handle the frontend for Home Assistant."""
|
"""Handle the frontend for Home Assistant."""
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from . import version, mdi_version
|
|
||||||
from homeassistant.components import api
|
from homeassistant.components import api
|
||||||
from homeassistant.components.http import HomeAssistantView
|
from homeassistant.components.http import HomeAssistantView
|
||||||
|
from . import version, mdi_version
|
||||||
|
|
||||||
DOMAIN = 'frontend'
|
DOMAIN = 'frontend'
|
||||||
DEPENDENCIES = ['api']
|
DEPENDENCIES = ['api']
|
||||||
|
@ -64,7 +64,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
continue
|
continue
|
||||||
sensor_name = str(ts_sensor.id)
|
sensor_name = str(ts_sensor.id)
|
||||||
|
|
||||||
for datatype in sensor_value_descriptions.keys():
|
for datatype in sensor_value_descriptions:
|
||||||
if datatype & datatype_mask and ts_sensor.has_value(datatype):
|
if datatype & datatype_mask and ts_sensor.has_value(datatype):
|
||||||
|
|
||||||
sensor_info = sensor_value_descriptions[datatype]
|
sensor_info = sensor_value_descriptions[datatype]
|
||||||
|
@ -68,7 +68,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
|
|
||||||
dev = []
|
dev = []
|
||||||
for device in devices:
|
for device in devices:
|
||||||
for type_name in SENSOR_TYPES.keys():
|
for type_name in SENSOR_TYPES:
|
||||||
dev.append(ThinkingCleanerSensor(device, type_name,
|
dev.append(ThinkingCleanerSensor(device, type_name,
|
||||||
update_devices))
|
update_devices))
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ class AcerSwitch(SwitchDevice):
|
|||||||
else:
|
else:
|
||||||
self._available = False
|
self._available = False
|
||||||
|
|
||||||
for key in self._attributes.keys():
|
for key in self._attributes:
|
||||||
msg = CMD_DICT.get(key, None)
|
msg = CMD_DICT.get(key, None)
|
||||||
if msg:
|
if msg:
|
||||||
awns = self._write_read_format(msg)
|
awns = self._write_read_format(msg)
|
||||||
|
@ -47,7 +47,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
|
|
||||||
dev = []
|
dev = []
|
||||||
for device in devices:
|
for device in devices:
|
||||||
for type_name in SWITCH_TYPES.keys():
|
for type_name in SWITCH_TYPES:
|
||||||
dev.append(ThinkingCleanerSwitch(device, type_name,
|
dev.append(ThinkingCleanerSwitch(device, type_name,
|
||||||
update_devices))
|
update_devices))
|
||||||
|
|
||||||
|
@ -72,7 +72,6 @@ def color_RGB_to_xy(R, G, B):
|
|||||||
# taken from
|
# taken from
|
||||||
# https://github.com/benknight/hue-python-rgb-converter/blob/master/rgb_cie.py
|
# https://github.com/benknight/hue-python-rgb-converter/blob/master/rgb_cie.py
|
||||||
# Copyright (c) 2014 Benjamin Knight / MIT License.
|
# Copyright (c) 2014 Benjamin Knight / MIT License.
|
||||||
# pylint: disable=bad-builtin
|
|
||||||
def color_xy_brightness_to_RGB(vX, vY, brightness):
|
def color_xy_brightness_to_RGB(vX, vY, brightness):
|
||||||
"""Convert from XYZ to RGB."""
|
"""Convert from XYZ to RGB."""
|
||||||
brightness /= 255.
|
brightness /= 255.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user