diff --git a/ha/automations.yaml b/ha/automations.yaml new file mode 100644 index 0000000..b019b79 --- /dev/null +++ b/ha/automations.yaml @@ -0,0 +1,48 @@ +- id: '1770778485341' + alias: Frigate Notifications (0.14.0.2w) + description: '' + use_blueprint: + path: SgtBatten/Stable.yaml + input: + base_url: https://ha.goattw.net + notify_device: 77ce3c5e3add8ea306c1a8e28477809a + camera: + - camera.front_porch + tap_action: https://ha.goattw.net/api/frigate/notifications/{{id}}/clip.mp4 +- id: diun_image_update + alias: Diun - Docker Image Update Notification + description: Sends a mobile notification when Diun detects a new Docker image version + triggers: + - platform: webhook + webhook_id: diun_image_update + allowed_methods: + - POST + actions: + - data: + title: "\U0001F433 Docker Image Update" + message: '{{ trigger.json.message }}' + action: notify.mobile_app_tomcell +- id: ha_core_version_update_alert + alias: HA Core Update - ntfy Alert + description: "ntfy to grafana-alerts when Core installed_version changes; includes old/new version and hard-refresh reminder" + triggers: + - platform: state + entity_id: update.home_assistant_core_update + attribute: installed_version + conditions: + - condition: template + value_template: >- + {{ trigger.from_state is not none + and trigger.to_state is not none + and trigger.from_state.attributes.get('installed_version') not in [none, ''] + and trigger.to_state.attributes.get('installed_version') not in [none, ''] + and trigger.from_state.attributes['installed_version'] != trigger.to_state.attributes['installed_version'] }} + actions: + - action: rest_command.ntfy_grafana_alerts + data: + title: "HA Core Updated: {{ trigger.to_state.attributes['installed_version'] }}" + message: >- + Core auto-updated: {{ trigger.from_state.attributes['installed_version'] }} → {{ trigger.to_state.attributes['installed_version'] }}. + Hard-refresh your browser: Ctrl+Shift+R (Win/Linux) or Cmd+Shift+R (Mac) to clear frontend cache. + priority: high + tags: warning,house diff --git a/ha/configuration.yaml b/ha/configuration.yaml new file mode 100644 index 0000000..7e06acc --- /dev/null +++ b/ha/configuration.yaml @@ -0,0 +1,27 @@ +# Loads default set of integrations. Do not remove. +default_config: + +# Load frontend themes from the themes folder +frontend: + themes: !include_dir_merge_named themes + +automation: !include automations.yaml +script: !include scripts.yaml +scene: !include scenes.yaml +http: + use_x_forwarded_for: true + trusted_proxies: + - 192.168.99.0/24 # <--- Trusts ANY device on your home network (Router, Server, Laptop) + - 172.16.0.0/12 # <--- Trusts all Docker containers + - 127.0.0.1 # <--- Localhost + +rest_command: + ntfy_grafana_alerts: + url: https://ntfy.goattw.net/grafana-alerts + method: POST + content_type: "text/plain" + payload: "{{ message }}" + headers: + Title: "{{ title | default('Home Assistant') }}" + Priority: "{{ priority | default('default') }}" + Tags: "{{ tags | default('house') }}"