RESTful sensor: get attributes in different json levels

Is it possible to have json_attributes from different levels like the sample code below (not working yet)?

sensor:
  - platform: rest
    name: JSON attributes
    json_attributes:
      - nickname
      - address.street
      - address.city
    resource: https://jsonplaceholder.typicode.com/users
    value_template: "{{ value_json.name }}"

That’s not supported.

Thanks. So the workaround that I can think of is to create additional REST sensor for the ‘address’ JSON level. Then create a template sensor combining those attributes. This way we have to query twice the same JSON file. Any better workaround?

Consider using the RESTful integration. I provided an example here (second example in the post):

1 Like

Thank you. It’s very useful.