Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aneisch committed Apr 6, 2024
1 parent 8ca890f commit 65b6b97
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 26 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Build Status](https://github.com/aneisch/home-assistant-config/actions/workflows/check-ha-release-compatibility.yml/badge.svg)](https://github.com/aneisch/home-assistant-config/actions)
[![GitHub last commit](https://img.shields.io/github/last-commit/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/commits/master)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/graphs/commit-activity)
[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.4.0%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.4.1%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
<br><a href="https://www.buymeacoffee.com/aneisch" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-black.png" width="150px" height="35px" alt="Buy Me A Coffee" style="height: 35px !important;width: 150px !important;" ></a>


Expand Down Expand Up @@ -57,7 +57,7 @@ Also using Grafana/Influx for graphing, both running in Docker containers on NUC
Description | value
-- | --
Lines of ESPHome YAML | 2801
Lines of Home Assistant YAML | 8964
Lines of Home Assistant YAML | 8977
[Integrations](https://www.home-assistant.io/integrations/) in use | 58
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37
Expand Down Expand Up @@ -142,8 +142,8 @@ Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain |
[dylandoamaral/uptime-card](https://github.com/dylandoamaral/uptime-card)<br>
[gadgetchnnel/lovelace-card-templater](https://github.com/gadgetchnnel/lovelace-card-templater)<br>
[gadgetchnnel/lovelace-text-input-row](https://github.com/gadgetchnnel/lovelace-text-input-row)<br>
[htmltiger/numberbox-card](https://github.com/htmltiger/numberbox-card)<br>
[j-a-n/lovelace-wallpanel](https://github.com/j-a-n/lovelace-wallpanel)<br>
[junkfix/numberbox-card](https://github.com/junkfix/numberbox-card)<br>
[kalkih/mini-media-player](https://github.com/kalkih/mini-media-player)<br>
[nervetattoo/simple-thermostat](https://github.com/nervetattoo/simple-thermostat)<br>
[ofekashery/vertical-stack-in-card](https://github.com/ofekashery/vertical-stack-in-card)<br>
Expand Down
12 changes: 6 additions & 6 deletions automations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
allowed_methods:
- POST
action:
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: '{{ trigger.json.notifications[0].message }}: {{ trigger.json.run_url
}}'
Expand Down Expand Up @@ -284,7 +284,7 @@
then:
- if: '{{ is_state(''input_boolean.cellular_message_test_pending'', ''on'') }}'
then:
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: Modem Healtcheck Failed, Power Cycling
- service: esphome.cellular_modem_power_toggle
Expand Down Expand Up @@ -766,7 +766,7 @@
- platform: homeassistant
event: start
action:
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: 'Home Assistant v{{ states(''sensor.ha_version'')}} has started!
Expand Down Expand Up @@ -812,7 +812,7 @@
action:
- service: switch.turn_off
entity_id: switch.coffee_maker
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: 'Turned coffee maker off!
Expand Down Expand Up @@ -865,7 +865,7 @@
- if:
- '{{ float(trigger.to_state.state, default=-1) > 0.00 }}'
then:
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: 'Rain started!
Expand All @@ -878,7 +878,7 @@
above: 50
for: 03:00:00
action:
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: 'Refrigerator power consumption >50W for three hours. Is it frozen
up?
Expand Down
7 changes: 7 additions & 0 deletions configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,13 @@ notify:
recipients: # one or more recipients
- !secret signal_group_frigate

- platform: signal_messenger
name: signal_homeassistant
url: "http://localhost:8800" # the URL where the Signal Messenger REST API is listening
number: !secret signal_phone
recipients: # one or more recipients
- !secret signal_group_homeassistant

# - name: gsm_message
# platform: rest
# resource: http://127.0.0.1:9999/send_message
Expand Down
2 changes: 1 addition & 1 deletion extras/Node-RED/flows.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions extras/docker-compose/other/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,15 @@ services:
#- "8808:8080"
volumes:
- "/opt/signal-rest-api:/home/.local/share/signal-cli"
labels:
# HTTPS Local Only (with 80-->443 redirect)
- traefik.enable=false # Disabled
- traefik.http.services.signal_local.loadbalancer.server.port=8080
- traefik.http.routers.signal_local.service=signal_local
- traefik.http.routers.signal_local.tls=true
- traefik.http.routers.signal_local.tls.certResolver=le-home
- traefik.http.routers.signal_local.tls.domains[0].main=*.home.domain.com
- traefik.http.routers.signal_local.rule=Host(`signal.home.domain.com`)

apcupsd:
container_name: apcupsd
Expand Down Expand Up @@ -606,6 +615,10 @@ services:
- traefik.http.routers.codeproject_local.tls.domains[0].main=*.home.domain.com
- traefik.http.routers.codeproject_local.rule=Host(`codeproject.home.domain.com`)
- traefik.http.routers.codeproject_local.service=codeproject
- traefik.http.routers.codeproject_local.middlewares=codeproject_local_redirect
- traefik.http.middlewares.codeproject_local_redirect.redirectregex.regex=^https://codeproject.home.domain.com/(.*)
- traefik.http.middlewares.codeproject_local_redirect.redirectregex.replacement=http://10.0.1.22:32168/$${1}
- traefik.http.middlewares.codeproject_local_redirect.redirectregex.permanent=true

auto-southwest:
image: jdholtz/auto-southwest-check-in:develop
Expand Down
13 changes: 13 additions & 0 deletions extras/docker-compose/unified/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,15 @@ services:
#- "8808:8080"
volumes:
- "/opt/signal-rest-api:/home/.local/share/signal-cli"
labels:
# HTTPS Local Only (with 80-->443 redirect)
- traefik.enable=false # Disabled
- traefik.http.services.signal_local.loadbalancer.server.port=8080
- traefik.http.routers.signal_local.service=signal_local
- traefik.http.routers.signal_local.tls=true
- traefik.http.routers.signal_local.tls.certResolver=le-home
- traefik.http.routers.signal_local.tls.domains[0].main=*.home.domain.com
- traefik.http.routers.signal_local.rule=Host(`signal.home.domain.com`)

apcupsd:
container_name: apcupsd
Expand Down Expand Up @@ -836,6 +845,10 @@ services:
- traefik.http.routers.codeproject_local.tls.domains[0].main=*.home.domain.com
- traefik.http.routers.codeproject_local.rule=Host(`codeproject.home.domain.com`)
- traefik.http.routers.codeproject_local.service=codeproject
- traefik.http.routers.codeproject_local.middlewares=codeproject_local_redirect
- traefik.http.middlewares.codeproject_local_redirect.redirectregex.regex=^https://codeproject.home.domain.com/(.*)
- traefik.http.middlewares.codeproject_local_redirect.redirectregex.replacement=http://10.0.1.22:32168/$${1}
- traefik.http.middlewares.codeproject_local_redirect.redirectregex.permanent=true

auto-southwest:
image: jdholtz/auto-southwest-check-in:develop
Expand Down
1 change: 1 addition & 0 deletions extras/traefik/dynamic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ tls:
stores:
default:
defaultCertificate:
# Cloudflare Origin Cert
certFile: /opt/certs/cert.crt
keyFile: /opt/certs/cert.key
4 changes: 2 additions & 2 deletions extras/traefik/traefik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ certificatesResolvers:
email: "EMAIL"
storage: "/etc/traefik/acme.json"

log:
level: DEBUG
# log:
# level: DEBUG
Binary file modified images/nodered_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/nodered_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/door_otp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ automation:
entity_id: lock.garage_exterior_door
data:
code_slot: 30
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: "Garage code {{ trigger.json['otp'] }} generated for {{ trigger.json['email'] }}"
- service: zwave_js.set_lock_usercode
Expand Down
4 changes: 2 additions & 2 deletions packages/frigate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ automation:
entity_id: "input_datetime.usps_last"
time: "{{ ((as_timestamp(now())) | timestamp_custom('%H:%M:%S', true)) }}"
date: "{{ (as_timestamp(now()) | timestamp_custom('%Y-%m-%d', true)) }}"
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: "USPS detected"
data:
Expand All @@ -131,7 +131,7 @@ automation:

- if: "{{ 'PrimeAir' in trigger.payload_json['after']['label'] }}"
then:
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: "Prime Air Drone detected"
data:
Expand Down
6 changes: 3 additions & 3 deletions packages/hass_update_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ script:
# Notify and enable update button on frontend
sequence:
#- service: shell_command.pull_hass
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: >
Not Installing: {{ states('sensor.ha_version') }} --> {% if states('binary_sensor.hass_on_beta') == 'on' %}{{ states('sensor.ha_docker_version_beta') }}{% else %}{{ states('sensor.ha_docker_version_stable') }}{% endif %}
Expand All @@ -203,7 +203,7 @@ script:
hass_update_install:
# Notify and install latest version
sequence:
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: >
Installing: {{ states('sensor.ha_version') }} --> {% if states('binary_sensor.hass_on_beta') == 'on' %}{{ states('sensor.ha_docker_version_beta') }}{% else %}{{ states('sensor.ha_docker_version_stable') }}{% endif %}
Expand All @@ -222,7 +222,7 @@ script:
service: shell_command.switch_hass_running_branch
data:
version: "{{ states('input_text.hass_target_branch') }}"
- service: notify.signal_self
- service: notify.signal_homeassistant
data:
message: >
Auto-switched to stable build
Expand Down
13 changes: 7 additions & 6 deletions packages/leak_detection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,29 +118,30 @@ automation:
id: "water_sensor_alert"
trigger:
- platform: state
id: non_esphome
id: critical
entity_id:
- binary_sensor.guest_bathroom_toilet_water_detector
- binary_sensor.back_bathroom_toilet_water_detector
- binary_sensor.kitchen_sink_water_detector
- binary_sensor.master_bathroom_water_detector
- binary_sensor.water_shutoff_water_detector
- binary_sensor.laundry_room_water_detector
- binary_sensor.kitchen_water_detector
- binary_sensor.misc_water_detector_in_office_cabinet_unused
to: "on"
- platform: state
id: esphome
id: non_critial
entity_id:
- binary_sensor.laundry_room_water_detector
- binary_sensor.water_heater_water_detector
- binary_sensor.kitchen_water_detector
to: "on"
action:
- if: "{{ trigger.id == 'non_esphome' }}"
- if: "{{ trigger.id == 'critical' }}"
then:
- service: switch.turn_on
entity_id: switch.water_shutoff
- service: script.notify_wrapper
data:
message: "Water detected by {{ trigger.to_state.name }}. {% if trigger.id == 'non_esphome' %}Shutting off water!{% endif %}"
message: "Water detected by {{ trigger.to_state.name }}. {% if trigger.id == 'non_critical' %}Shutting off water!{% endif %}"
data:
priority: 2
# - service: notify.alexa_media
Expand Down
7 changes: 6 additions & 1 deletion scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,20 @@ notify_wrapper:
- if: '{{ "priority" in data }}'
then:
- service: notify.pushover
continue_on_error: true
data:
message: "{{ message }}"
data:
priority: "{{ data.priority }}"
expire: 600
retry: 30
- service: notify.signal_homeassistant
data:
message: "{{ message }}"
# If internet on and no priority set: send via signal
else:
- service: notify.signal_self
- service: notify.signal_homeassistant
continue_on_error: true
data:
message: "{{ message }}"

Expand Down
2 changes: 1 addition & 1 deletion scripts/traefik_urls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Read active routers from Traefik API and output JSON of all host rules

IFS=, read -d '' -a myarray <<< $(curl --silent http://traefik.home.mydomain.com/api/http/routers | jq -r . | grep -i rule | sed -e 's/.*ost(`//' -e 's/`.*//')
IFS=, read -d '' -a myarray <<< $(curl --silent https://traefik.home.mydomain.com/api/http/routers | jq -r . | grep -i rule | grep -v "HostRegexp" | sed -e 's/.*ost(`//' -e 's/`.*//')

json_array=$(jq --compact-output --null-input '$ARGS.positional' --args -- ${myarray[@]})
echo "{\"urls\": $json_array }"

0 comments on commit 65b6b97

Please sign in to comment.