Clean up access to config in various integrations v4 (#34174)

* Clean up access to config in various integrations v4

* Address review comments
This commit is contained in:
springstan authored and GitHub committed 2020-04-14 20:38:55 +02:00
1 parent 96aaa25aad
commit e2af216bcd
20 files changed
+53 -55

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the CPU speed sensor."""
name = config.get(CONF_NAME)
name = config[CONF_NAME]
add_entities([CpuSpeedSensor(name)], True)