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

Rejectattr

$
0
0

Hi, I have a component that counts active switches:

 - platform: template
    sensors:
      count_switch:
        friendly_name: 'Switch attivi'
        unique_id: switch_attivi111
        value_template: "{{ states.switch | selectattr('state', 'eq', 'on') | rejectattr('entity_id','in',('switch.shelly_em', 'switch.luce_divano', 'switch.luce_cucina', 'switch.luce_tavola', 'switch_scheduler')) | list | count }}"      

Is there a way to exclude all the switches of an integration (xiaomi)? I inserted a robot vacuum cleaner that has 20…

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106737

Trending Articles



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