diff --git a/config/packages/twitter.yaml b/config/packages/twitter.yaml index 12df0165..702e56df 100755 --- a/config/packages/twitter.yaml +++ b/config/packages/twitter.yaml @@ -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", diff --git a/config/script/tweet.yaml b/config/script/tweet.yaml index 72cf6f44..aa913903 100755 --- a/config/script/tweet.yaml +++ b/config/script/tweet.yaml @@ -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": [