Hi guys!
I have a REST endpoint which returns an array describing some sensors.
curl -X GET http://192.168.1.2/api/sensors
[{
"temperature": 15.2, "humidity": 50.5, "pressure": 990.5, "id": 0, "type": "BME280", "title": "Air"},
{"temperature": 15.6, "id": 1, "type": "DS18B20", "title": "Water"}]
Now I would like to have these sensors individually appear in Home Assistant, but I have no idea what should go to the individual value_template
entries.
sensor:
- platform: rest
name: outdoor
resource: http://192.168.1.2/api/sensors
headers:
User-Agent: Home Assistant
Content-Type: application/json
- platform: template
sensors:
air_temperature:
value_template: "{{ ??? }}"
entity_id: sensor.air_temperature
friendly_name: 'Air temperature'
water_temperature:
value_template: "{{ ???? }}"
entity_id: sensor.water_temperature
friendly_name: 'Water temperature'
[...]
Thank you in advance!