Skip to content

Commit

Permalink
Update to 2025.1.4
Browse files Browse the repository at this point in the history
- add water usage package
- remove water entities from energy ui
- refactor speech helper templates
- update camera object detection notifications
- add water usage automations, templates for
- prevent waste notifications when boolean is off
- replace Tempest weather station
- update weather templates
- update weather graphs
- remove Charlie pebblebee tracker
- update commute ui
- update traffic view
- simplify person ui
- bugfix sprinkler cards secondary text
- move test items to test view
- bugfix mobile high accuracy not always turning on
  • Loading branch information
jazzyisj committed Jan 25, 2025
1 parent 85c9a90 commit fadd108
Show file tree
Hide file tree
Showing 110 changed files with 1,690 additions and 1,145 deletions.
2 changes: 1 addition & 1 deletion .HA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025.1.2
2025.1.4
4 changes: 2 additions & 2 deletions automations/alarm/alarm_open_sensor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
save_message: false
message: |
{%- from 'speech_helpers.jinja' import array_to_clist %}
{%- from 'speech_helpers.jinja' import plural_word %}
{%- from 'speech_helpers.jinja' import plural_verb %}
{%- set entities = expand(state_attr('alarm_control_panel.master', 'open_sensors'))
| map(attribute='name') | list %}
{%- set sensors = array_to_clist(entities, true) | replace(' Open Alert', '') %}
Attention! The house alarm could not be armed!
The {{ sensors }}{{ plural_word('', entities|count, true) }} open!
The {{ sensors }}{{ plural_verb(entities|count) }} open!
continue_on_error: true

- if:
Expand Down
5 changes: 3 additions & 2 deletions automations/alarm/alarm_triggered_notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,11 @@
data:
title: "House Alarm Triggered!"
message: |
{%- from 'speech_helpers.jinja' import clist_suffix %}
{%- from 'speech_helpers.jinja' import array_to_clist %}
{%- from 'speech_helpers.jinja' import plural_verb %}
{%- set home = state_attr('binary_sensor.someone_home', 'home') %}
The house alarm was triggered by the {{ states('input_text.current_alarm') }} at {{ now().strftime('%-I:%M %p') }}.
{{ clist_suffix(home, true, true, '') }} home.
{{ array_to_clist(home, true) }} {{ plural_verb(home | count) }} home.
data:
images:
- "/config/www/{{ file1 }}"
Expand Down
17 changes: 14 additions & 3 deletions automations/camera/camera_event_detected.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############################################################################
## Camera - Event Detected
###############################################################################
- id: camera_event_detected #TEST working for audio events?
- id: camera_event_detected
alias: "[Camera] Event Detected"
description: "Camera event detected notification."
mode: queued
Expand Down Expand Up @@ -30,12 +30,23 @@
condition: template
value_template: "{{ object != 'dog' }}"

# prevent notifications when arriving home
- alias: "Someone hasn't just arrived home"
condition: state
entity_id: binary_sensor.someone_home
entity_id:
- binary_sensor.someone_home
- binary_sensor.guest_home
attribute: just_arrived
state: false

# prevent notifications when arriving home
- alias: "Someone isn't almost home"
condition: template
value_template: >
{{ is_state('input_boolean.jason_almost_home', 'off')
and now() - states.input_boolean.jason_almost_home.last_changed > timedelta(seconds=120) }}
# prevent notifications when leaving home
- alias: "Front/Side door was not just locked or unlocked"
condition: template
value_template: >
Expand Down Expand Up @@ -67,7 +78,7 @@
variables:
provider: "Piper" #BUG tts.piper faster but gets cut off on cast speakers
min_volume: 60
always_play: true
quiet_play: true
save_message: false
#BUGFIX add Attention!, text so actual message isn't cut off
message: |
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions automations/energy/water_meter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
###############################################################################
## Energy - Generate Water Meter Pulse
## https://community.home-assistant.io/t/water-meter-with-shelly-uni/567365
###############################################################################
- id: energy_generate_water_meter_pulse
alias: "[Energy] Generate Water Meter Pulse"
description: "Converts ADC reading to a pulse when value is below 13V."
mode: queued
trigger:
- platform: numeric_state
entity_id: sensor.water_meter_adc
below: 13
action:
- service: input_boolean.toggle
target:
entity_id: input_boolean.water_meter_pulse
- delay:
milliseconds: 100
- service: input_boolean.toggle
target:
entity_id: input_boolean.water_meter_pulse
8 changes: 3 additions & 5 deletions automations/hass/hass_update_group_entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,13 @@
object_id: unavailable_entities_filtered
#TEMP exclude garage_inside - cam not working
#TEMP exclude front_door_lock - lock not working
#TEMP exclude tempest, weatherflow - sensor down
#TEMP exclude hydrawise - API errors
entities: >
{% set ignored2 = state_attr('sensor.disabled_device_entities', 'entities')
|regex_replace(find='\[|\]|\{|\}|\'entity_id\':', replace='') %}
{% set disabled = state_attr('sensor.disabled_device_entities', 'entities')
| regex_replace(find='\[|\]|\{|\}|\'entity_id\':', replace='') %}
{{ states
| selectattr('state', 'in', ['unknown', 'unavailable'])
| rejectattr('domain', 'in', ['button', 'conversation', 'device_tracker', 'event', 'group', 'image', 'input_button', 'input_text', 'remote', 'tts', 'scene', 'stt'])
| rejectattr('entity_id', 'in', ignored2)
| rejectattr('entity_id', 'in', disabled)
| rejectattr('entity_id', 'in', integration_entities('browser_mod'))
| rejectattr('entity_id', 'in', integration_entities('fully_kiosk'))
| rejectattr('entity_id', 'in', integration_entities('hassio'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
to:
- not_home
- Near Home
- Almost Home

# almost home
- trigger: state
Expand Down Expand Up @@ -47,7 +48,8 @@
entity_id: switch.jason_phone_high_accuracy
state: "off"

- condition: template
- alias: "Only use activity triggers near home"
condition: template
value_template: >
{{ iif(trigger.entity_id == 'sensor.jphone_detected_activity',
states('sensor.home_jason_distance') | int(-1) <= 10, true) }}
Expand Down
3 changes: 3 additions & 0 deletions automations/network/network_update_group_entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@
{{ states.device_tracker | selectattr('attributes.source_type', 'eq', 'bluetooth_le')
| map(attribute='entity_id') | list
| select('has_value') | sort }}
#IDEA Event data for call_service exceed maximum size of 32768 bytes
# thousands of ble devices - truncate entities?
10 changes: 5 additions & 5 deletions automations/notify/notify_alert_announcements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
variables:
message: |
{%- from 'speech_helpers.jinja' import array_to_clist %}
{% from 'speech_helpers.jinja' import clist_suffix %}
{%- from 'speech_helpers.jinja' import plural_word %}
{%- from 'speech_helpers.jinja' import plural %}
{%- from 'speech_helpers.jinja' import plural_verb %}
{%- set t = trigger.entity_id %}
{%- if t == 'alert.open_windows' %}
Looks like a beautiful {{ states('sensor.tod_greeting') }} out there!
Expand Down Expand Up @@ -49,10 +49,10 @@
The hot tub is offline. Check the breaker and make sure the hot tub is on.
{%- elif t == 'alert.leak_detected' %}
{%- set entities = expand(state_attr('binary_sensor.leak_detected_alert', 'entity_id')) | map(attribute='name') | list %}
Attention! Moisture has been detected by the {{ clist_suffix(entities, false, false, 'leak sensor') }}!
Attention! Moisture has been detected by the {{ array_to_clist(entities, false) }} {{ plural('leak_sensor', entities | count) }}!
{%- elif t == 'alert.unavailable_leak_sensor' %}
{%- set entities = expand(state_attr('binary_sensor.unavailable_leak_sensor', 'entity_id')) | map(attribute='name') | list %}
Attention! The {{ clist_suffix(entities, false, true, 'sensor') }} offline!
Attention! The {{ array_to_clist(entities, false) }} {{ plural('sensor') }} {{ plural_verb(entities | count) }} offline!
{%- elif t == 'alert.indoor_sump' %}
Attention! There is a critical issue with the indoor sump pump!
{%- elif t == 'alert.outdoor_sump' %}
Expand Down Expand Up @@ -112,7 +112,7 @@
{%- set entities = expand(state_attr('binary_sensor.hvac_window_door_open_alert', 'entity_id'))
| map(attribute='name') | list %}
{%- set open_names = array_to_clist(entities, true) | replace(' Open Alert', '') %}
Attention! The thermostat has been turned off because the {{ open_names }}{{ plural_word('', entities | count, true) }} open!
Attention! The thermostat has been turned off because the {{ open_names }}{{ plural_verb(entities | count) }} open!
{%- elif t == 'alert.bathroom_mold_risk' %}
Attention! The bathroom mold risk alert is active.
{%- elif t == 'alert.door_lock_jammed' %}
Expand Down
2 changes: 1 addition & 1 deletion automations/presence/presence_occupancy_notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
{%- endif %}
<b>Home: </b>
{%- from 'speech_helpers.jinja' import array_to_clist %}
{%- from 'speech_helpers.jinja' import plural_word %}
{%- from 'speech_helpers.jinja' import plural %}
{{- array_to_clist(state_attr('binary_sensor.someone_home', 'home'), true) }}
{%- if is_state('binary_sensor.charlie_home', 'on') %}
{%- if is_state('binary_sensor.someone_home', 'on') %}, Charlie
Expand Down
6 changes: 3 additions & 3 deletions automations/schedule/schedule_waste_collection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
active_types: >
{% set types = namespace(value = []) %}
{% for type in waste_types %}
{% if is_state_attr('sensor.next_' ~ type ~ '_day', 'display', 'Tomorrow') %}
{% if is_state_attr('sensor.next_' ~ type ~ '_day', 'display', 'Tomorrow')
and is_state('input_boolean.' ~ type ~ 'alert', 'on') %}
{% set types.value = types.value + [type] %}
{% endif %}
{% endfor %}
Expand All @@ -102,8 +103,7 @@
variables:
message: >
{% from 'speech_helpers.jinja' import array_to_clist %}
{% set active_list = array_to_clist(active_types, false) %}
Hey Jason, don't forget to take out the {{ active_list }} today!
Hey Jason, don't forget to take out the {{ array_to_clist(active_types, false) }} today!
quiet_play: true
save_message: true
continue_on_error: true
Expand Down
Loading

0 comments on commit fadd108

Please sign in to comment.