Created a custom sensor to pull the water level for a public lake form an API. Its working great, updating nightly and has been for a few days.
rest:
- scan_interval: 3600
resource: https://waterservices.usgs.gov/nwis/dv/?format=json&sites=02187010
sensor:
- name: "Lake Elevation"
value_template: >
{% set i = value_json['value']['timeSeries']
|selectattr('variable.variableDescription','contains','Elevation')
|selectattr('variable.options.option.0.value','==','Mean')
|list|first %}
{{ i['values'][0]['value'][0]['value'] }}
unit_of_measurement: 'ft'
I can add it to a mini-graph card, but i can’t select the entity in the default statics graph card. Any ideas?