Remove None from dict.get(key, None) (#33794)
This commit is contained in:
parent
d54ee77375
commit
46bbe816f6
45 changed files with 104 additions and 110 deletions
|
@ -44,7 +44,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the SQL sensor platform."""
|
||||
db_url = config.get(CONF_DB_URL, None)
|
||||
db_url = config.get(CONF_DB_URL)
|
||||
if not db_url:
|
||||
db_url = DEFAULT_URL.format(hass_config_path=hass.config.path(DEFAULT_DB_FILE))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue