Address review items and potentially unexpected normalize behavior with jsonpath

pull/31809/head
J. Nick Koston 2020-02-16 01:26:46 +00:00
parent 648aa5f969
commit fe9e179092
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ class RestSensor(Entity):
json_dict = json.loads(value)
if self._json_attrs_path is not None:
json_dict = jsonpath(json_dict, self._json_attrs_path)
if isinstance(json_dict, list):
elif isinstance(json_dict, list):
json_dict = json_dict[0]
if isinstance(json_dict, dict):
attrs = {