Check flake & pylint style

This commit is contained in:
badele committed 2015-10-06 08:44:15 +02:00
1 parent 7f71706f08
commit 32f1791c5a
3 files changed
+25 -26

No files matched your search

+8 -7
View File
@@ -45,7 +45,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
for entity_id, entity_info in devices.items():
if entity_id not in rfxtrx.RFX_DEVICES:
_LOGGER.info("Add %s rfxtrx.light", entity_info['name'])
rfxobject = rfxtrx.getRFXObject(entity_info['packetid'])
rfxobject = rfxtrx.get_rfx_object(entity_info['packetid'])
new_light = RfxtrxLight(entity_info['name'], rfxobject, False)
rfxtrx.RFX_DEVICES[entity_id] = new_light
lights.append(new_light)
@@ -61,13 +61,14 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
if entity_id not in rfxtrx.RFX_DEVICES:
automatic_add = config.get('automatic_add', False)
if automatic_add:
_LOGGER.info("Automatic add %s rfxtrx.light (class: %s subtype: %s)",
entity_id,
event.device.__class__.__name__,
event.device.subtype
_LOGGER.info(
"Automatic add %s rfxtrx.light (Class: %s Sub: %s)",
entity_id,
event.device.__class__.__name__,
event.device.subtype
)
packet_id = "".join("{0:02x}".format(x) for x in event.data)
entity_name = "%(entity_id)s : %(packet_id)s" % locals()
pkt_id = "".join("{0:02x}".format(x) for x in event.data)
entity_name = "%s : %s" % (entity_id, pkt_id)
new_light = RfxtrxLight(entity_name, event, False)
rfxtrx.RFX_DEVICES[entity_id] = new_light
add_devices_callback([new_light])