Small collection of random styling tweaks, fixes and Pythonism (#35390)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-05-09 00:10:17 +02:00
1 parent 3feb55a8e4
commit 4cf186a47e
14 files changed
+28 -57

No files matched your search

+1 -4
View File
@@ -77,10 +77,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry):
def create_blebox_entities(product, async_add, entity_klass, entity_type):
"""Create entities from a BleBox product's features."""
entities = []
for feature in product.features[entity_type]:
entities.append(entity_klass(feature))
entities = [entity_klass(feature) for feature in product.features[entity_type]]
async_add(entities, True)