From b2bb25c65ba1ca1e12231bd0f4c1868f5ccd4c18 Mon Sep 17 00:00:00 2001 From: ccostan Date: Fri, 30 Mar 2018 10:52:43 -0400 Subject: [PATCH] New tweet language. --- config/automation/ifttt_logger.yaml | 2 -- config/packages/twitter.yaml | 27 +++++++++++++++++++++++++-- config/script/tweet.yaml | 3 ++- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/config/automation/ifttt_logger.yaml b/config/automation/ifttt_logger.yaml index dfe222aa..5e966d15 100755 --- a/config/automation/ifttt_logger.yaml +++ b/config/automation/ifttt_logger.yaml @@ -31,8 +31,6 @@ ] | random + " #SavingWater"}} image: >- {{ [ - "/config/www/custom_ui/floorplan/images/branding/sleeping.png", "/config/www/custom_ui/floorplan/images/branding/sprinkler.png", "/config/www/custom_ui/floorplan/images/branding/sprinkler2.png" - ] | random }} diff --git a/config/packages/twitter.yaml b/config/packages/twitter.yaml index 8e833e85..917ba805 100755 --- a/config/packages/twitter.yaml +++ b/config/packages/twitter.yaml @@ -132,7 +132,28 @@ sensor: {% endif %} {%- endfor -%} {%- endfor -%} - + tracker_count: + friendly_name: 'Number of Devices' + value_template: > + {%- set domains = ['device_tracker'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} + lights_count: + friendly_name: 'Number of Lights' + value_template: > + {%- set domains = ['light'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} group: tweet_stats: @@ -147,6 +168,8 @@ group: - sensor.script_count - sensor.binary_sensor_count - sensor.automation_count + - sensor.lights_count + - sensor.device_tracker ############################################################# @@ -224,7 +247,7 @@ automation: "solar", "solar", "robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot", "robot","robot","robot", "door", "door", "door", - "weather", "weather", "weather", "weather", "weather", + "weather", "weather", "weather", "weather", "weather", "cloud", "internet", "internet", "internet", "internet", "stocks", "stocks", diff --git a/config/script/tweet.yaml b/config/script/tweet.yaml index a5d4c237..37545821 100755 --- a/config/script/tweet.yaml +++ b/config/script/tweet.yaml @@ -32,7 +32,8 @@ tweet_engine_setup: "Home Assistant has been running for {{ states('sensor.ha_uptime') }}. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)", "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)" + "{{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.devices_count.state}} devices in the house. (https://github.com/CCOSTAN/Home-AssistantConfig#logo)" ], "door": [