mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
Remove deprecated battery alert automations and templates; update HVAC alert triggers and actions; modify front door alert notifier; fix low salt alert message; adjust Bayesian sensor state; clean up unused binary sensor configurations.
This commit is contained in:
@@ -1,104 +0,0 @@
|
||||
alias: "Battery Alert"
|
||||
id: automation_battery_alert
|
||||
initial_state: off
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "10:00:00"
|
||||
- platform: time
|
||||
at: "18:00:00"
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.light 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.switch 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.sensor 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.zwave 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.lock 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
action:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
message: >-
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.light if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.light if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Lights:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.switch if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.switch if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Switches:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.sensor if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Sensors:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.zwave if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.zwave if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Zwaves:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.lock if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.lock if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Locks:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
@@ -1,69 +0,0 @@
|
||||
alias: "Battery Alert Template"
|
||||
id: automation_battery_alert_template
|
||||
initial_state: off
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "10:00:00"
|
||||
- platform: time
|
||||
at: "18:00:00"
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.light 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.switch 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.sensor 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.zwave 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.lock 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.binary_sensor 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")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
action:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
message: >-
|
||||
{% set threshold = 40 %}
|
||||
|
||||
{% for item in states.binary_sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < 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")) %}
|
||||
{%- if loop.first %}Binary Sensors:{% endif %}
|
||||
{{ item.name }} {{ item.attributes.battery_level / 5 }}%
|
||||
{%- endfor -%}
|
||||
@@ -1,7 +1,7 @@
|
||||
alias: "Alert that something is open and the HVAC equipment is on"
|
||||
id: automation_something_open_hvac_on
|
||||
|
||||
trigger:
|
||||
triggers:
|
||||
platform: state
|
||||
entity_id: binary_sensor.something_open_hvac_on
|
||||
from: "off"
|
||||
@@ -18,9 +18,6 @@ action:
|
||||
actions:
|
||||
- action: "ALARM" # The key you are sending for the event
|
||||
title: "Sound Alarm" # The button title
|
||||
- action: "URI" # Must be set to URI if you plan to use a URI
|
||||
title: "Open Url"
|
||||
uri: "https://google.com" # URL to open when action is selected, can also be a lovelace view/dashboard
|
||||
- action: "URI"
|
||||
title: "Adjust Thermostat"
|
||||
uri: "entityId:climate.thermostat"
|
||||
Reference in New Issue
Block a user