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

How to list all sensors with state = 'unavailable', 'none' or 'unknown'

$
0
0

@boneheadfraggle wrote:

I’d like an overview of all sensor that are unavailable, state = none or unknown. I put together this:

        {% for item in states %}
          {% if item.state | lower == 'unavailable' or item.state | lower == 'unknown' or item.state | lower == 'none'%}
            {{ item.attributes.friendly_name }} is {{ item.state }}
          {% endif %}
        {% endfor %}

…which lists the sensors correctly in the template window. But it needs some trimming to remove unnecessary spaces and so on. But - how to best show the result? I thought of a templated sensor, but they can only contain 255 characters which may be too little. Suggestions?

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 96123

Trending Articles



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