Hi
I’m trying to get values form JSON https://pastebin.com/xXWLFF57
Is it possible to get the whole JSON and in templates get values
- platform: rest
scan_interval: 800
name: smieci
value_template: '{{ value_json }}'
resource: http://192.168.2.215:8120/smieci
- platform: template
sensors:
smieci_bk:
friendly_name: >-
{% for trash in value_json %}
{% if trash["type"]=="BK" %}
{{trash["desc"]}}
{% endif %}
{% endfor %}
entity_picture_template: >-
{% for trash in value_json %}
{% if trash["type"]=="BK" %}
{{trash["icon"]}}
{% endif %}
{% endfor %}
value_template: >-
{% for trash in value_json %}
{% if trash["type"]=="BK" %}
{{smieci["date"]}}
{% endif %}
{% endfor %}