mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 02:38:10 +02:00
Address review items and potentially unexpected normalize behavior with jsonpath
This commit is contained in:
@ -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 = {
|
||||
|
Reference in New Issue
Block a user