Advertisement
Guest User

Untitled

a guest
Oct 31st, 2019
375
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - platform: rest
  2. scan_interval: 900
  3. name: Airly
  4. resource: https://airapi.airly.eu/v2/measurements/nearest?lat=54.301177&lng=18.577890&maxDistanceKM=5
  5. value_template: "{{ value_json['current']['values'][0]['value'] }} {{ value_json['current']['values'][1]['value'] }} {{ value_json['current']['values'][2]['value'] }} {{ value_json['current']['values'][3]['value'] }} {{ value_json['current']['values'][4]['value'] }} {{ value_json['current']['values'][5]['value'] }} {{ value_json['current']['indexes'][0]['level'] }} {{ value_json['current']['indexes'][0]['value'] }} {{ value_json['current']['indexes'][0]['description'] }}"
  6. headers:
  7. apikey: xxxxxxxx
  8. Accept-Language: pl
  9.  
  10. - platform: template
  11. sensors:
  12. airly_pm1:
  13. friendly_name: "Pył PM1"
  14. icon_template: mdi:jquery
  15. unit_of_measurement: "μg/m3"
  16. value_template: "{{ states.sensor.airly.state.split(' ')[0] }}"
  17. airly_pm25:
  18. friendly_name: "Pył PM25"
  19. icon_template: mdi:jquery
  20. unit_of_measurement: "μg/m3"
  21. value_template: "{{ states.sensor.airly.state.split(' ')[1] }}"
  22. airly_pm10:
  23. friendly_name: "Pył PM10"
  24. icon_template: mdi:jquery
  25. unit_of_measurement: "μg/m3"
  26. value_template: "{{ states.sensor.airly.state.split(' ')[2] }}"
  27. airly_pressure:
  28. friendly_name: "Ciśnienie"
  29. icon_template: mdi:gauge
  30. unit_of_measurement: "hPA"
  31. value_template: "{{ states.sensor.airly.state.split(' ')[3] | float | round(1) }}"
  32. airly_humidity:
  33. friendly_name: "Wilgotność"
  34. icon_template: mdi:water-percent
  35. unit_of_measurement: "%"
  36. value_template: "{{ states.sensor.airly.state.split(' ')[4] | float | round(0) }}"
  37. airly_temperature:
  38. friendly_name: "Temperatura"
  39. icon_template: mdi:thermometer
  40. unit_of_measurement: "°C"
  41. value_template: "{{ states.sensor.airly.state.split(' ')[5] | float | round(1) }}"
  42. airly_quality:
  43. friendly_name: "Jakość powietrza"
  44. icon_template: mdi:quicktime
  45. value_template: "{{ states.sensor.airly.state.split(' ')[6] }}"
  46. airly_level:
  47. friendly_name: "Poziom"
  48. icon_template: mdi:database
  49. value_template: "{{ states.sensor.airly.state.split(' ')[7] | float | round(0) }}"
  50. airly_description:
  51. friendly_name: "Komunikat"
  52. icon_template: mdi:alert
  53. value_template: "{{ states.sensor.airly.state.split(' ')[8:] | join(' ') }}"
Advertisement
RAW Paste Data Copied
Advertisement