Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 111360

Rest value_template giving warning about attribute being unsafe

$
0
0

I’m trying to use a rest binary sensor to pull data from Tautulli’s API to check for an update. However, I’m getting WARNING messages in my log saying

Template variable warning: access to attribute 'update' of 'dict' object is unsafe. when rendering '{{ value_json.response.data.update }}'

Is there a way to make this warning go away? Do I need to check that value_json.response.data isn’t null first?

Here is my rest component configuration

- platform: rest
  resource: https://tau.deadlypenguin.com/api/v2?apikey=XXXX&cmd=update_check
  value_template: "{{ value_json.response.data.update }}"
  device_class: update
  name: Tautulli Update Available

I’d also note that I have a similar one that goes through a different cmd but does not produce any warnings in the logs.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 111360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>