This commit is contained in:
ccostan 2018-04-08 12:03:42 -04:00
parent 6f923e2d5b
commit 7cfc9970d9
2 changed files with 16 additions and 2 deletions

View File

@ -154,6 +154,18 @@ sensor:
{% endif %}
{%- endfor -%}
{%- endfor -%}
protect_count:
friendly_name: 'Number of Smoke Detectors'
value_template: >
{% if states('group.protects') == 'on' %}
{% for e in states.group.protects.attributes.entity_id if states(e) == 'on' %}
{% if loop.last %}
{{ loop.index }}
{% endif %}
{%- endfor -%}
{% else %}
0
{% endif %}
group:
tweet_stats:
@ -170,6 +182,7 @@ group:
- sensor.automation_count
- sensor.lights_count
- sensor.tracker_count
- sensor.protect_count
#############################################################
@ -246,7 +259,7 @@ automation:
{% set pick = [
"minecraft",
"solar", "solar",
"robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot","robot","robot",
"robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot","robot","robot","robot",
"door", "door", "door",
"weather", "weather", "weather", "weather", "weather",
"cloud",

View File

@ -34,7 +34,8 @@ tweet_engine_setup:
"My Home Assistant has been tested by Travis-CI and {{states('sensor.ccostanhomeassistantconfig_state')}}. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"{{((states.sensor.sensor_count.state | int) + (states.sensor.binary_sensor_count.state | int))}} sensors feed my Smart Home #data. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"{{states.sensor.automation_count.state}} automations and {{states.sensor.script_count.state}} scripts make my home smart (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"Nevermind me. I am just keeping track of {{states.sensor.lights_count.state}} lights and {{states.sensor.tracker_count.state}} devices in the house. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)"
"Nevermind me. I am just keeping track of {{states.sensor.lights_count.state}} lights and {{states.sensor.tracker_count.state}} devices in the house. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)",
"There are {{states.sensor.protect_count.state}} Nest Protect smoke Detectors ONLINE and protecting the house! (https://github.com/CCOSTAN/Home-AssistantConfig#nest) "
],
"door": [