Background:
Occasionally I browse YouTube for ideas and how-to(s). Watching the background (Overview) on a video from BeardedTinker, I set my quest to replicate one of his overview status screens. It took more effort and research than I anticipated, but I put a checkmark in the acomplished box.
I use my overview of 19 manually created sensors to provide a visual of my HA Configuration. I would also recommend using a history card to show progress for this like my self that are making daily changes. Each of the sensors provide an updated count(s) of various things within the configuration. Some of these may not be helpful for those who do not break their YAML into chunks or program within the UI.
I thought it would be a nice contribution now that I have it fine-tuned. If anyone has any to add, please let me know. I am curious how many take the YAML and use it. Any questions, comments… Let me know.
The code (written as it would be in configuration.yaml) including necessary headers:
default_config:
sensors:
# Count Number Of Automations
- platform: template
sensors:
count_automations:
friendly_name: "Count Of Automations"
value_template: >-
{{ states.automation | list | count }}
# Count Number Of Binary Sensors
- platform: template
sensors:
count_binary_sensor:
friendly_name: "Count Of Binary Sensors"
value_template: >-
{{ states.binary_sensor | list | count }}
# Count Number Of Covers
- platform: template
sensors:
count_covers:
friendly_name: "Count Of Cover (Doors)"
value_template: >-
{{ states.cover | list | count }}
# Count Number Of Device Trackers
- platform: template
sensors:
count_device_trackers:
friendly_name: "Count Of Device Trackers"
value_template: >-
{{ states.device_tracker | list | count }}
# Count Number Of Entities
- platform: template
sensors:
count_entities:
friendly_name: "Count Of Entities"
value_template: >
{{ states | length }}
# Count Number Of Groups
- platform: template
sensors:
count_groups:
friendly_name: "Count Of Groups"
value_template: >-
{{ states.group | list | count }}
# Count Number Of Input Numbers
- platform: template
sensors:
count_input_numbers:
friendly_name: "Count Of Input Numbers"
value_template: >-
{{ states.input_number | list | count }}
# Count Number Of Input Select
- platform: template
sensors:
count_input_selects:
friendly_name: "Count Of Input Selects"
value_template: >-
{{ states.input_select | list | count }}
# Count Number Of Input Text
- platform: template
sensors:
count_input_texts:
friendly_name: "Count Of Input Texts"
value_template: >-
{{ states.input_text | list | count }}
# Count Number Of Lights
- platform: template
sensors:
count_lights:
friendly_name: "Count Of Lights"
value_template: >-
{{ states.light | list | count }}
# Count Number Of Media Players
- platform: template
sensors:
count_media_players:
friendly_name: "Count Of Media Players"
value_template: >-
{{ states.media_player | list | count }}
# Count Number Of Persons
- platform: template
sensors:
count_persons:
friendly_name: "Count Of Persons"
value_template: >-
{{ states.person | list | count }}
# Count Number Of Scripts
- platform: template
sensors:
count_scripts:
friendly_name: "Count Of Scripts"
value_template: >-
{{ states.script | list | count }}
# Count Number Of Sensors
- platform: template
sensors:
count_sensor:
friendly_name: "Count Of Sensors"
value_template: >-
{{ states.sensor | list | count }}
# Count Number Of Switches
- platform: template
sensors:
count_switches:
friendly_name: "Count Of Switches"
value_template: >-
{{ states.switch | list | count }}
# Count Number Of Timers
- platform: template
sensors:
count_timers:
friendly_name: "Count Of Timers"
value_template: >-
{{ states.timer | list | count }}
# Count YAML Files
- platform: command_line
name: "Count YAML Files"
command: " find /config/ -name '*.yaml' | wc -l"
# Count YAML Lines
- platform: command_line
name: "Count YAML Lines"
command: " find /config/ -name '*.yaml' | xargs cat | wc -l"
# Count Number Of Zones
- platform: template
sensors:
count_zones:
friendly_name: "Count Of Zones"
value_template: >-
{{ states.zone | list | count }}