Roldy's Home Assistant - 190+ sensors - 440+ entities - 70+ automations - Floorplan

I would like to share my home assistant configuration example for the rest of the community to check out and hopefully get some ideas!

(If you would like an example specifically, let me know)

2 Likes

not that it is a competition, :grinning: It would be quite interesting to see how many of these things everyone has…

1 Like

From where are you pulling the data?

- platform: template
  sensors:
 #----- Count Automations
   count_automations:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['automation'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Device Trackers
   count_device_trackers:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['device_tracker'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}        
 #----- Count Lights
   count_lights:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['light'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Binary Sensors
   count_binary_sensors:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['binary_sensor'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Sensors
   count_sensors:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['sensor'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Switches
   count_switches:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['switch'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Zones
   count_zones:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['zone'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Cameras
   count_cameras:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['camera'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Plants
   count_plants:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['plant'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Media Players
   count_media_players:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['media_player'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Scripts
   count_scripts:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['script'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Locks
   count_lock:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['lock'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Vacuum
   count_vacuum:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['vacuum'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
 #----- Count Zwave
   count_zwave:
     entity_id: sensor.date
     value_template: >
       {%- set domains = ['zwave'] -%}
       {%- for domain in domains -%}
         {%- for item in states[domain] -%}
           {% if loop.first %}
             {{loop.length}}
           {% endif %}
         {%- endfor -%}
       {%- endfor -%}
2 Likes

Excellent! Thanks!!