Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - platform: rest
- name: json4
- json_attributes_path: "$.features[0].['properties']"
- json_attributes:
- - title
- - header
- - description
- - beginPeriod
- - lastModified
- - coordinates
- - geometry
- resource: http://home.ajer.dk:8123/local.testy.json
- value_template: "{{ value_json.features[0]['properties']['title'] }}"
- - platform: template
- sensors:
- json4_sensor1:
- friendly_name_template: "json4 main"
- value_template: >
- {{ states("sensor.json4") + ' / ' + state_attr("sensor.json4","description") + ' / ' + state_attr("sensor.json4","lastModified") }}
- - platform: template
- sensors:
- json4_info:
- friendly_name_template: "For lovelace"
- value_template: >
- {{ state_attr("sensor.json4","header") + '\n' ' Opdateret: ' + state_attr("sensor.json4","lastModified") }}
- ##### This is where i need the cordinates output ######
- - platform: template
- sensors:
- json4_map:
- friendly_name_template: "GPS for lovelace"
- value_template: >
- {{ state_attr("sensor.json4","coordinates") }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement