From b8164684911c9f013d3d41d495935dd10d77b1ef Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sun, 6 Mar 2022 18:37:26 -0500 Subject: [PATCH] Removing the low battery sensor. It isn't work properly an just generating errors. Need to redo --- config/sensors/power.yaml | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/config/sensors/power.yaml b/config/sensors/power.yaml index 9c8d22f..2c528d7 100755 --- a/config/sensors/power.yaml +++ b/config/sensors/power.yaml @@ -1,21 +1,21 @@ -- platform: template - sensors: - low_battery: - friendly_name: 'Low Battery' - 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 -%} \ No newline at end of file +# - platform: template +# sensors: +# low_battery: +# friendly_name: 'Low Battery' +# 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 -%} \ No newline at end of file