From fe9e179092f2a664e3668e0c832856bf5c78d262 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 16 Feb 2020 01:26:46 +0000 Subject: [PATCH] Address review items and potentially unexpected normalize behavior with jsonpath --- homeassistant/components/rest/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/rest/sensor.py b/homeassistant/components/rest/sensor.py index 9372d76cd8a..fe9e165ba45 100644 --- a/homeassistant/components/rest/sensor.py +++ b/homeassistant/components/rest/sensor.py @@ -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 = {