Clean up access to config in various integrations (#33759)
This commit is contained in:
1 parent
ba8ae17487
commit
c6c7dd10f5
11 files changed
+38
-35
No files matched your search
@@ -29,8 +29,8 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Binary Sensor platform for ADS."""
|
||||
ads_hub = hass.data.get(DATA_ADS)
|
||||
|
||||
ads_var = config.get(CONF_ADS_VAR)
|
||||
name = config.get(CONF_NAME)
|
||||
ads_var = config[CONF_ADS_VAR]
|
||||
name = config[CONF_NAME]
|
||||
device_class = config.get(CONF_DEVICE_CLASS)
|
||||
|
||||
ads_sensor = AdsBinarySensor(ads_hub, name, ads_var, device_class)
|
||||
|
||||
Reference in new issue
Block a user