adding some sensors to track unavailable entitites

This commit is contained in:
Jeffrey Stone 2021-05-24 11:49:58 -04:00
parent ff6fc57df0
commit 56b8514c62
1 changed files with 14 additions and 3 deletions

View File

@ -65,11 +65,11 @@
days: 7 days: 7
- platform: statistics - platform: statistics
name: Outside Temp Stats name: Outside Temp Stats
entity_id: sensor.back_porch_temperature entity_id: sensor.acurite_6045m_3078_t
sampling_size: 500 sampling_size: 500
- platform: statistics - platform: statistics
name: Garage Temp Stats name: Garage Temp Stats
entity_id: sensor.garage_temperature entity_id: sensor.acurite_tower_10968_t
sampling_size: 500 sampling_size: 500
- platform: min_max - platform: min_max
name: Inside Temp Stats name: Inside Temp Stats
@ -194,12 +194,23 @@
friendly_name: 'Number of Entities' friendly_name: 'Number of Entities'
value_template: >- value_template: >-
{{ states | rejectattr('state', 'eq', 'unavailable') | list | count}} {{ states | rejectattr('state', 'eq', 'unavailable') | list | count}}
na_entities:
friendly_name: 'NA Entities'
value_template: >-
{{ states | selectattr('state', 'eq', 'unavailable') | map(attribute='entity_id') | list }}
na_entities_count:
friendly_name: 'Number of NA Entities'
value_template: >-
{{ states | selectattr('state', 'eq', 'unavailable') | map(attribute='entity_id') | list | count }}
hvac_action: hvac_action:
friendly_name: 'HVAC Action' friendly_name: 'HVAC Action'
value_template: "{{states.climate.home.attributes.hvac_action}}" value_template: "{{states.climate.home.attributes.hvac_action}}"
today_is: today_is:
friendly_name: 'Today is' friendly_name: 'Today is'
value_template: "{{ ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] }}" value_template: "{{ ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][now().weekday()] }}"
month_is:
friendly_name: 'Month is'
value_template: "{{ ['January','February','March','April','May','June','August','September','October','November','December'][now().month-1] }}"
holiday: holiday:
friendly_name: 'Holiday' friendly_name: 'Holiday'
value_template: >- value_template: >-