From d0dad2b91fc7e09ccf0d184d171a4e1069fd3f1e Mon Sep 17 00:00:00 2001
From: ccostan <carlo@ipm.com>
Date: Wed, 24 Jun 2020 13:40:34 -0400
Subject: [PATCH] Not worth the trouble.  Reverting back #784

---
 .../Timed_Triggers/sunrise_turn_off.yaml      |  4 --
 config/packages/ha_stats.yaml                 | 59 -------------------
 config/packages/twitter.yaml                  | 18 +-----
 config/sensor/hass_stats.yaml.DELETEME        | 41 -------------
 config/sensor/nest.yaml.DELETEME              | 27 ---------
 5 files changed, 2 insertions(+), 147 deletions(-)
 delete mode 100755 config/packages/ha_stats.yaml
 delete mode 100755 config/sensor/hass_stats.yaml.DELETEME
 delete mode 100755 config/sensor/nest.yaml.DELETEME

diff --git a/config/automation/Timed_Triggers/sunrise_turn_off.yaml b/config/automation/Timed_Triggers/sunrise_turn_off.yaml
index 6f6844ef..aa137037 100755
--- a/config/automation/Timed_Triggers/sunrise_turn_off.yaml
+++ b/config/automation/Timed_Triggers/sunrise_turn_off.yaml
@@ -60,7 +60,3 @@
         - input_boolean.medicine
         - input_boolean.daylight_override
         - input_boolean.guest_mode
-
-    - service: counter.reset
-      data:
-        entity_id: counter.automation_triggered
diff --git a/config/packages/ha_stats.yaml b/config/packages/ha_stats.yaml
deleted file mode 100755
index 69401d3f..00000000
--- a/config/packages/ha_stats.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
-#-------------------------------------------
-#  Fire Tablet Alarm Panel -
-#  https://www.vcloudinfo.com/2017/07/visualizing-smart-home-using-home.html
-#-------------------------------------------
-#
-# homeassistant:
-#   customize_glob:
-#     "sensor.*_alarm_panel*":
-#
-#
-#     "binary_sensor.*_alarm_panel*":
-#
-#
-
-sensor:
-  - platform: template
-    sensors:
-      low_battery:
-        friendly_name: 'Low Battery'
-        entity_id: []
-        value_template: >
-          {%- set threshold = 15 -%}
-          {%- set domains = ['light', 'switch', 'sensor', 'zwave', 'lock', 'binary_sensor'] -%}
-          {%- for domain in domains -%}
-            {%- for item in states[domain] if ((item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown"))) -%}
-              {{ item.attributes.friendly_name }} (
-              {%- if item.attributes.battery_level is defined -%}
-                {{ item.attributes.battery_level}}
-              {%- else -%}
-                {{item.state}}
-              {%- endif -%}%)
-              {%- if not loop.last -%}
-                {{', '}}
-              {%- endif -%}
-            {%- endfor -%}
-          {%- endfor -%}
-
-automation:
-  - alias: 'Battery Alert'
-    initial_state: 'on'
-    trigger:
-      - platform: time
-        at: '10:00:00'
-      - platform: time
-        at: '18:00:00'
-    condition:
-      condition: template
-      value_template: "{% if states('sensor.low_battery') %}true{% endif %}"
-    action:
-      - service: persistent_notification.create
-        data_template:
-          title: Low Battery
-          message: "{{ states('sensor.low_battery') }}"
-          notification_id: low-battery-alert
-      - service: script.notify_engine
-        data_template:
-          value1: "Low battery levels: {{ states('sensor.low_battery') }}"
-          who: 'carlo'
-          apns_id: 'information'
diff --git a/config/packages/twitter.yaml b/config/packages/twitter.yaml
index d9951281..b3cbafde 100755
--- a/config/packages/twitter.yaml
+++ b/config/packages/twitter.yaml
@@ -82,7 +82,7 @@ sensor:
     end: '{{ now() }}'
     duration:
       days: 7
-      
+
   - platform: version
     name: HA Installed Version
     scan_interval: 86400
@@ -178,24 +178,9 @@ sensor:
         value_template: >
           {{ states.camera | list | count }}
 
-counter:
-  automation_triggered:
-    name: Automations Triggered daily
-    icon: mdi:counter
-    initial: 1 # Counter resets at Sunrise [sunrise_turn_off.yaml].
-    step: 1
 #############################################################
 
 automation:
-  - alias: 'Count triggered Automations'
-    trigger:
-      platform: event
-      event_type: automation_triggered
-
-    action:
-      - service: counter.increment
-        data:
-          entity_id: counter.automation_triggered
 
   - alias: 'New Twitter follower!'
     trigger:
@@ -208,6 +193,7 @@ automation:
       - condition: state
         entity_id: group.bed
         state: 'off'
+
     action:
       - service: media_player.play_media
         data_template:
diff --git a/config/sensor/hass_stats.yaml.DELETEME b/config/sensor/hass_stats.yaml.DELETEME
deleted file mode 100755
index 318381af..00000000
--- a/config/sensor/hass_stats.yaml.DELETEME
+++ /dev/null
@@ -1,41 +0,0 @@
-###################################################
-## * Special HASS related sensors - Thanks @torn8o
-###################################################
-
-- platform: version
-  name: HA Installed Version
-  scan_interval: 86400
-
-- platform: command_line
-  name: "HA Uptime"
-  command: echo "$(($(date +%s) - $(date -d "$(head -n1 /config/home-assistant.log | cut -d' ' -f-2)" +%s)))"
-  scan_interval: 720
-  value_template: >-
-    {% set uptime = value | int %}
-    {% set seconds = uptime % 60 %}
-    {% set minutes = ((uptime % 3600) / 60) | int %}
-    {% set hours = ((uptime % 86400) / 3600) | int %}
-    {% set days = (uptime / 86400) | int %}
-    {%- if days > 0 -%}
-      {%- if days == 1 -%}
-        1 day
-      {%- else -%}
-        {{ days }} days
-      {%- endif -%}
-      {{ ', ' }}
-    {%- endif -%}
-    {%- if hours > 0 -%}
-      {%- if hours == 1 -%}
-        1 hour
-      {%- else -%}
-        {{ hours }} hours
-      {%- endif -%}
-      {{ ', ' }}
-    {%- endif -%}
-    {%- if minutes > 0 -%}
-      {%- if minutes == 1 -%}
-        1 minute
-      {%- else -%}
-        {{ minutes }} minutes
-      {%- endif -%}
-    {%- endif -%}
diff --git a/config/sensor/nest.yaml.DELETEME b/config/sensor/nest.yaml.DELETEME
deleted file mode 100755
index cd1eb842..00000000
--- a/config/sensor/nest.yaml.DELETEME
+++ /dev/null
@@ -1,27 +0,0 @@
-###################################################
-## * [Nest Thermostats](http://amzn.to/2eAhB1k)
-# @CCOSTAN
-# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
-###################################################
-
-#- platform: nest
-#  monitored_conditions:
-#     - 'temperature'
-#     - 'target'
-#     - 'humidity'
-#     - 'operation_mode'
-#     - 'last_connection'
-#     - 'co_status'
-#     - 'smoke_status'
-
-# - platform: template
-#   sensors:
-#      upstairs_away_mode:
-#        entity_id: []
-#        value_template: "{{ is_state_attr('climate.upstairs', 'away_mode', 'on') }}"
-#
-# - platform: template
-#   sensors:
-#      downstairs_away_mode:
-#        entity_id: []
-#        value_template: "{{ is_state_attr('climate.downstairs', 'away_mode', 'on') }}"