Clean up access to config in various integrations v5 (#34206)

This commit is contained in:
springstan authored and GitHub committed 2020-04-15 14:10:07 +02:00
1 parent 1ea7229f32
commit d842dacfd6
21 files changed
+58 -58

No files matched your search

@@ -36,9 +36,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Deutsche Bahn Sensor."""
start = config.get(CONF_START)
destination = config.get(CONF_DESTINATION)
offset = config.get(CONF_OFFSET)
only_direct = config.get(CONF_ONLY_DIRECT)
destination = config[CONF_DESTINATION]
offset = config[CONF_OFFSET]
only_direct = config[CONF_ONLY_DIRECT]
add_entities([DeutscheBahnSensor(start, destination, offset, only_direct)], True)