Merge of nested IF-IF cases - O-R (#48371)

This commit is contained in:
Franck Nijhof 2021-03-27 10:38:57 +01:00 committed by GitHub
parent 3cd52b695d
commit 3aed84560f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 77 additions and 79 deletions

View file

@ -266,9 +266,8 @@ def get_entities(onewirehub: OneWireHub, config):
"""Get a list of entities."""
entities = []
device_names = {}
if CONF_NAMES in config:
if isinstance(config[CONF_NAMES], dict):
device_names = config[CONF_NAMES]
if CONF_NAMES in config and isinstance(config[CONF_NAMES], dict):
device_names = config[CONF_NAMES]
conf_type = config[CONF_TYPE]
# We have an owserver on a remote(or local) host/port