Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Beispiel für RESTful Sensor in Home Assistant zur Abfrage des luftdaten.info API
sensor:
- platform: rest
resource: http://api.luftdaten.info/v1/sensor/1777
value_template: >
{% if value_json is sequence %}
{% set sensor = value_json | last %}
{% else %}
{% set sensor = value_json %}
{% endif %}
{% for sdv in sensor.sensordatavalues %}
{% if sdv.value_type == "P1" %}
{{ sdv.value | int }}
{% endif %}
{% endfor %}
unit_of_measurement: "µg/m³"
name: "PM10"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.