Clean up access to config in various integrations v2 (#33763)
This commit is contained in:
1 parent
d95ffb3aa3
commit
d7e3b0b755
20 files changed
+59
-59
No files matched your search
@@ -45,10 +45,10 @@ REGISTER_SERVICE_SCHEMA = vol.Schema(
|
||||
|
||||
def get_service(hass, config, discovery_info=None):
|
||||
"""Return push service."""
|
||||
name = config.get(CONF_NAME)
|
||||
cert_file = config.get(CONF_CERTFILE)
|
||||
topic = config.get(CONF_TOPIC)
|
||||
sandbox = config.get(CONF_SANDBOX)
|
||||
name = config[CONF_NAME]
|
||||
cert_file = config[CONF_CERTFILE]
|
||||
topic = config[CONF_TOPIC]
|
||||
sandbox = config[CONF_SANDBOX]
|
||||
|
||||
service = ApnsNotificationService(hass, name, topic, sandbox, cert_file)
|
||||
hass.services.register(
|
||||
|
||||
Reference in new issue
Block a user