Created
February 25, 2019 10:38
-
-
Save bbbenji/3b0fe78950141f4c86ac3e600e3b86a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Airly | |
- platform: rest | |
scan_interval: 120 | |
name: Airly | |
resource: !secret airly_resource | |
value_template: "{{ 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'] }}" | |
headers: | |
apikey: !secret airly_apikey | |
- platform: template | |
sensors: | |
airly_pm25: | |
friendly_name: "PM25" | |
unit_of_measurement: "μg/m3" | |
icon_template: mdi:air-filter | |
value_template: "{{ states.sensor.airly.state.split(' ')[0] }}" | |
airly_pm10: | |
friendly_name: "PM10" | |
unit_of_measurement: "μg/m3" | |
icon_template: mdi:air-filter | |
value_template: "{{ states.sensor.airly.state.split(' ')[1] }}" | |
airly_pressure: | |
friendly_name: "Pressure" | |
unit_of_measurement: "hPA" | |
icon_template: mdi:air-gauge | |
value_template: "{{ states.sensor.airly.state.split(' ')[2] }}" | |
airly_humidity: | |
friendly_name: "Humidity" | |
unit_of_measurement: "%" | |
icon_template: mdi:water-percent | |
value_template: "{{ states.sensor.airly.state.split(' ')[3] }}" | |
airly_temperature: | |
friendly_name: "Temperature" | |
unit_of_measurement: "°C" | |
icon_template: mdi:thermometer | |
value_template: "{{ states.sensor.airly.state.split(' ')[4] }}" | |
airly_quality: | |
friendly_name: "Air Quality" | |
icon_template: mdi:air-filter | |
value_template: "{{ states.sensor.airly.state.split(' ')[5] }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment