Trying to get a rest command to get values out of it like tempf. Been trying for about a week and no luck.
wondering if someone could help?
If someone could help. I tried this and not working. data[0].lastData.tempf. Also data.lastData.tempf
Trying to get a rest command to get values out of it like tempf. Been trying for about a week and no luck.
wondering if someone could help?
If someone could help. I tried this and not working. data[0].lastData.tempf. Also data.lastData.tempf
rest:
- resource: https://lightning.ambientweather.net/devices?%24publicBox%5B0%5D%5B0%5D=-90.89011584686267&%24publicBox%5B0%5D%5B1%5D=44.2385849650517&%24publicBox%5B1%5D%5B0%5D=-90.80986415313706&%24publicBox%5B1%5D%5B1%5D=44.26440619716843&%24limit=100
scan_interval: 60 # in seconds, don't make it too often or you may trigger rate limits
sensor:
- name: "Temperature"
value_template: '{{ value_json.data[0].lastData.tempf }}'
unit_of_measurement: '°F'
device_class: temperature #optional
state_class: measurement # optional. Only include this if you want long term statistics
- name: "Humidity"
value_template: '{{ value_json.data[0].lastData.humidity }}'
unit_of_measurement: '%'
device_class: humidity #optional
state_class: measurement # optional. Only include this if you want long term statistics
For more sensors go to your resource in a web browser, click on the RAW data button and copy the data to the left column this website:
You can drill down in the right column to get your data path at the top of the right hand side. Replace x
with value_json
.
You can add as many sensors to the resource as you want, they will all be populated from each single call to the resource. The legacy restful sensor platform requires one resource call for each sensor, avoid using it.
You are amazing. Thank you so much. After a week of trying to get those values you did it in like ten minutes ha ha