Air Quality warning / data of current locations

Hi There,
I was playing around with the air quality integration (WAQI) and wondered if anyone succeeded to create an automatically updating tile that would take my phones current location as opposed to a fixed location?

Cheers

It is not availble from the integration but you could write a command_line integration where la/lon is based on a person lat/lon (templated)

along the docs this is the command to use

curl -i "http://api.waqi.info/feed/geo::lat;:lng/?token=:token"

Thanks for your quick reply and interesting solution. What do you mean by along the docs? Sorry, but I’m not so versed (yet).

Cheers!

This one
apiDoc: feed - 1.5.0 (aqicn.org)

I found it an interesting topic for myself too…this works with the card

command_line: 
  - sensor:
        name: airquality_local
        unique_id: airquality_local
        scan_interval: 14400
        command: >
            curl  "http://api.waqi.info/feed/geo:{{state_attr('zone.home','latitude')}};{{state_attr('zone.home','longitude')}}/?token=zzzzzzzzzzzz" | jq '. | {status: .status, aqi: .data.aqi, city: .data.city.name, dominentpol: .data.dominentpol, pressure: .data.iaqi.p.v, pm_2_5: .data.iaqi.pm25.v , pm_10: .data.iaqi.pm10.v, ozone: .data.iaqi.o3.v, nitrogen_dioxide: .data.iaqi.no2.v, temperature: .data.iaqi.t.v, time: .data.time.iso }'   
        value_template: > 
            {{ value_json.aqi }}        
        json_attributes:
          - status
          - aqi
          - dominentpol
          - pm_10
          - pm_2_5
          - pressure
          - temperature
          - nitrogen_dioxide
          - ozone
          - city
          - time