Change units of measure for proper graphing
This commit is contained in:
@@ -3,6 +3,7 @@ sensor:
|
|||||||
name: Lines of Code
|
name: Lines of Code
|
||||||
command: "find /config -name '*.yaml' | xargs cat | wc -l"
|
command: "find /config -name '*.yaml' | xargs cat | wc -l"
|
||||||
scan_interval: 20000
|
scan_interval: 20000
|
||||||
|
unit_of_measurement: ''
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
sensors:
|
sensors:
|
||||||
|
|||||||
@@ -3,35 +3,43 @@
|
|||||||
sensor_count:
|
sensor_count:
|
||||||
friendly_name: 'Number of Sensors'
|
friendly_name: 'Number of Sensors'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states.sensor | rejectattr('state', 'eq', 'unavailable') | list | count | int}}
|
{{ states.sensor | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
automation_count:
|
automation_count:
|
||||||
friendly_name: 'Number of Automations'
|
friendly_name: 'Number of Automations'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states.automation| rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
{{ states.automation| rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
script_count:
|
script_count:
|
||||||
friendly_name: 'Number of Scripts'
|
friendly_name: 'Number of Scripts'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states.script | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
{{ states.script | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
binary_sensor_count:
|
binary_sensor_count:
|
||||||
friendly_name: 'Number of Binary Sensors'
|
friendly_name: 'Number of Binary Sensors'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states.binary_sensor | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
{{ states.binary_sensor | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
tracker_count:
|
tracker_count:
|
||||||
friendly_name: 'Number of Devices'
|
friendly_name: 'Number of Devices'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states.device_tracker| rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
{{ states.device_tracker| rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
lights_count:
|
lights_count:
|
||||||
friendly_name: 'Number of Lights'
|
friendly_name: 'Number of Lights'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states.light | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
{{ states.light | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
switches_count:
|
switches_count:
|
||||||
friendly_name: 'Number of Switches'
|
friendly_name: 'Number of Switches'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states.switch | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
{{ states.switch | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
camera_count:
|
camera_count:
|
||||||
friendly_name: 'Number of online Cameras'
|
friendly_name: 'Number of online Cameras'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states.camera | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
{{ states.camera | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
media_player_count:
|
media_player_count:
|
||||||
friendly_name: 'Number of Media Players'
|
friendly_name: 'Number of Media Players'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
@@ -41,13 +49,15 @@
|
|||||||
friendly_name: 'Number of Entities'
|
friendly_name: 'Number of Entities'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
{{ states | rejectattr('state', 'eq', 'unavailable') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
na_entities_count:
|
na_entities_count:
|
||||||
friendly_name: 'Number of NA Entities'
|
friendly_name: 'Number of NA Entities'
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{{ states | selectattr('state', 'eq', 'unavailable') | map(attribute='entity_id') | list | count | int }}
|
{{ states | selectattr('state', 'eq', 'unavailable') | map(attribute='entity_id') | list | count | int }}
|
||||||
|
unit_of_measurement: ''
|
||||||
current_lights_on:
|
current_lights_on:
|
||||||
friendly_name: Current Lights On
|
friendly_name: Current Lights On
|
||||||
unit_of_measurement: 'on'
|
unit_of_measurement: ''
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set lights = [
|
{% set lights = [
|
||||||
states.light.living_room_color_1,
|
states.light.living_room_color_1,
|
||||||
@@ -81,7 +91,7 @@
|
|||||||
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
||||||
first_floor_lights_on:
|
first_floor_lights_on:
|
||||||
friendly_name: First Floor Lights On
|
friendly_name: First Floor Lights On
|
||||||
unit_of_measurement: 'on'
|
unit_of_measurement: ''
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set lights = [
|
{% set lights = [
|
||||||
states.light.living_room_color_1,
|
states.light.living_room_color_1,
|
||||||
@@ -98,7 +108,7 @@
|
|||||||
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
||||||
second_floor_lights_on:
|
second_floor_lights_on:
|
||||||
friendly_name: Second Floor Lights On
|
friendly_name: Second Floor Lights On
|
||||||
unit_of_measurement: 'on'
|
unit_of_measurement: ''
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set lights = [
|
{% set lights = [
|
||||||
states.light.hallway_overhead,
|
states.light.hallway_overhead,
|
||||||
@@ -117,7 +127,7 @@
|
|||||||
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
||||||
basement_lights_on:
|
basement_lights_on:
|
||||||
friendly_name: Basement Lights On
|
friendly_name: Basement Lights On
|
||||||
unit_of_measurement: 'on'
|
unit_of_measurement: ''
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set lights = [
|
{% set lights = [
|
||||||
states.light.basement_stairwell,
|
states.light.basement_stairwell,
|
||||||
@@ -128,7 +138,7 @@
|
|||||||
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
||||||
current_fans_on:
|
current_fans_on:
|
||||||
friendly_name: Current Fans On
|
friendly_name: Current Fans On
|
||||||
unit_of_measurement: 'on'
|
unit_of_measurement: ''
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set fans = [
|
{% set fans = [
|
||||||
states.fan.basement_fan,
|
states.fan.basement_fan,
|
||||||
@@ -139,7 +149,7 @@
|
|||||||
{{ fans | selectattr('state','eq','on') | list | count | int }}
|
{{ fans | selectattr('state','eq','on') | list | count | int }}
|
||||||
current_outdoor_lights_on:
|
current_outdoor_lights_on:
|
||||||
friendly_name: Current Outdoor Lights On
|
friendly_name: Current Outdoor Lights On
|
||||||
unit_of_measurement: 'on'
|
unit_of_measurement: ''
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set lights = [
|
{% set lights = [
|
||||||
states.light.front_porch_light
|
states.light.front_porch_light
|
||||||
@@ -147,7 +157,7 @@
|
|||||||
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
{{ lights | selectattr('state','eq','on') | list | count | int }}
|
||||||
climate_devices_installed:
|
climate_devices_installed:
|
||||||
friendly_name: Climate Devices Installed
|
friendly_name: Climate Devices Installed
|
||||||
unit_of_measurement: 'installed'
|
unit_of_measurement: ''
|
||||||
value_template: >-
|
value_template: >-
|
||||||
{% set devices = [
|
{% set devices = [
|
||||||
states.input_boolean.master_bedroom_aircon_installed,
|
states.input_boolean.master_bedroom_aircon_installed,
|
||||||
@@ -165,6 +175,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
birthdays_today:
|
birthdays_today:
|
||||||
friendly_name: Birthdays Today
|
friendly_name: Birthdays Today
|
||||||
|
unit_of_measurement: ''
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set birthdays = [
|
{% set birthdays = [
|
||||||
states.sensor.anniversary_tony_s_birthday,
|
states.sensor.anniversary_tony_s_birthday,
|
||||||
@@ -189,6 +200,7 @@
|
|||||||
# The sum of all the years of life in our household, because why not LOL
|
# The sum of all the years of life in our household, because why not LOL
|
||||||
total_age_years:
|
total_age_years:
|
||||||
friendly_name: Total Age Years
|
friendly_name: Total Age Years
|
||||||
|
unit_of_measurement: ''
|
||||||
value_template: >
|
value_template: >
|
||||||
{% set tony = states('sensor.tony_current_age') | int %}
|
{% set tony = states('sensor.tony_current_age') | int %}
|
||||||
{% set tina = states('sensor.tina_current_age') | int %}
|
{% set tina = states('sensor.tina_current_age') | int %}
|
||||||
|
|||||||
Reference in New Issue
Block a user