I curl a public sensor resulting giving this result:
{ “timestamp”: “2020-02-06T12:15:00+01:00”, “value”: 799.0, “trend”: 1, “stateMnwMhw”: “normal”, “stateNswHsw”: “normal” }
Now I struggle with extracting the valuevalue.
Here my (not working) template:
as there is no sensor sensor.rheinpegel.value, right?
the second problem is your state is most likely a sting, not a dictionary.
you might try something like this
value_template: >
{% set state = states('sensor.rheinpegel') | from_json %}
{{ state.get('value', 'unknown') }}