- platform: scrape
name: PSI Readings
resource: https://api.data.gov.sg/v1/environment/psi
select: "do not know what to enter here"
value_template: '{{do not know what to enter here as well}}'
unit_of_measurement: "ug/m3"
The line of data that I need from the body of data:
- platform: rest
name: Kansas Corona
resource: "https://api.data.gov.sg/v1/environment/psi"
json_attributes_path: "$.items[0].readings.pm25_twenty_four_hourly"
scan_interval: 3600 #seconds
value_template: "{{ value_json.items[0].readings.pm25_twenty_four_hourly.values() | sum }}"
unit_of_measurement: "ug/m3"
json_attributes:
- west
- national
- east
- central
- south
- north
Thanks for your help, @petro! I have managed to get the values I wanted. However, I thought earlier that string would be the same, and I wanted to try it myself. Hence, I omitted it from the first post, and now I am stuck again.