Merge pull request #1551 from CCOSTAN:Create-activity-logbook-engine

Whole new way to view Infrastructure events
This commit is contained in:
Carlo Costanzo
2025-12-12 16:40:33 -05:00
committed by GitHub
33 changed files with 348 additions and 352 deletions

View File

@@ -1,6 +1,13 @@
###################################
## Tornados are no Joke.
###################################
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# High Wind Alerts - Severe wind warnings (push + Activity feed)
# Related Issue: 1550
# Logs to Activity feed while keeping existing notifications and actions.
# -------------------------------------------------------------------
######################################################################
- alias: 'High Wind Speed Notification'
id: 5cc158a5-038a-4078-a9fb-c9f9cf9ecd49
@@ -17,6 +24,11 @@
above: 60
action:
- service: script.send_to_logbook
data:
topic: "WEATHER"
message: >-
Wind speed is {{ states('sensor.pirateweather_wind_speed') | round }} mph (thresholds: 30/40/60).
- service: script.notify_engine
data:
title: 'VERY HIGH WINDS:'

View File

@@ -1,6 +1,13 @@
###################################
## Uses IFTTT to notify me of bad logins.
###################################
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Bad Login Attempts - Log security events to Activity feed
# Related Issue: 1550
# Replaces phone push with `script.send_to_logbook` using `sensor.activity_feed`.
# -------------------------------------------------------------------
######################################################################
- alias: Login Failure
id: 814c48ea-e2e1-4b75-92b0-581081af5ce5
@@ -9,11 +16,7 @@
value_template: "{{ states('persistent_notification.httplogin') != 'unknown' }}"
action:
- service: script.notify_engine
- service: script.send_to_logbook
data:
value1: 'Bad Login: '
value2: 'There was a Hack attempt!'
value3: 'Go Check the GUI for details.'
who: 'carlo'
group: 'information'
topic: "SYSTEM"
message: "Bad Login: There was a hack attempt. Check the HA UI for details."

View File

@@ -1,6 +1,13 @@
###################################
## Trigger Dump
###################################
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Trigger Dump - Log feedreader events to Activity feed
# Related Issue: 1550
# Writes a Logbook entry and publishes payload to MQTT for debugging.
# -------------------------------------------------------------------
######################################################################
- alias: Trigger dump - MQTT
id: 74edd73d-f0a5-45cf-9561-c6a1777236e5
@@ -8,12 +15,10 @@
- platform: event
event_type: feedreader
action:
- service: script.notify_engine
- service: script.send_to_logbook
data:
value1: 'Check the MQTT Dump'
value2: '/dump/{{ trigger.platform }}'
who: 'carlo'
group: 'information'
topic: "SYSTEM"
message: "Check the MQTT dump: /dump/{{ trigger.platform }}"
- service: mqtt.publish
data:
topic: '/dump/{{ trigger.platform }}'

View File

@@ -1,6 +1,14 @@
###################################
## Start Up Section
###################################
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Startup Logbook Entry - Log HA restarts to Activity feed
# Related Issue: 1550
# Uses `script.send_to_logbook` + `sensor.activity_feed` (no phone push).
# Keeps an Alexa announce when daytime.
# -------------------------------------------------------------------
######################################################################
- alias: Startup Notification and Shut startup lights
id: f3f0a8d1-6c40-43e0-91e4-827194f78506
@@ -9,12 +17,10 @@
- platform: homeassistant
event: start
action:
- service: script.notify_engine
- service: script.send_to_logbook
data:
title: 'Home Assistant StartUp'
value1: 'Home Assistant is Up and Running!'
who: 'carlo'
group: 'information'
topic: "SYSTEM"
message: "Home Assistant is Up and Running!"
- service: homeassistant.turn_off
entity_id:
@@ -35,4 +41,3 @@
message: "Home Assistant has been restarted."
data:
type: announce

View File

@@ -90,4 +90,4 @@ scene: !include_dir_merge_list scene
# switch: !include_dir_merge_list switch
script: !include_dir_merge_named script
input_boolean: !include_dir_merge_named input_boolean
shell_command: !include_dir_merge_named shell_command

View File

@@ -43,9 +43,10 @@ Live collection of plug-and-play Home Assistant packages. Each YAML file in this
| [august.yaml](august.yaml) | Front-door August smart lock with Alexa Show camera pop-up when unlocked. | `lock.front_door`, media_player actions for front doorbell camera |
| [holiday.yaml](holiday.yaml) | REST-driven US holiday + flag sensors that color scenes and exterior lighting. | `sensor.holiday`, `sensor.flag`, JSON feed at `config/json_data/holidays.json` |
| [lightning.yaml](lightning.yaml) | Blitzortung lightning counter monitoring with snoozeable push actions. | `sensor.blitzortung_lightning_counter`, `input_boolean.snooze_lightning`, notify engine actions |
| [phynplus.yaml](phynplus.yaml) | Tie the Phyn Plus smart shutoff into HA notifications, automations, and valve overrides. | `valve.phyn_shutoff_valve`, `binary_sensor.phyn_leak_test_running`, `script.notify_engine_two_button` |
| [powerwall.yaml](powerwall.yaml) | Track Tesla Powerwall grid status and shed loads automatically when off-grid. | `binary_sensor.powerwall_grid_status`, `sensor.powerwall_*`, `script.notify_engine` |
| [vacuum.yaml](vacuum.yaml) | Dreame (ex-Neato) vacuum orchestration with continuous phased sweep/mop cycles. | `input_select.l10s_vacuum_phase`, `input_text.l10s_vacuum_room_queue`, `sensor.l10s_vacuum_task_status` |
| [logbook_activity_feed.yaml](logbook_activity_feed.yaml) | Dummy `sensor.activity_feed` + helper to write clean Activity entries (Issue #1550). | `sensor.activity_feed`, `script.send_to_logbook` |
| [phynplus.yaml](phynplus.yaml) | Phyn shutoff automations with push + Activity feed + Repairs issues for leak events. | `valve.phyn_shutoff_valve`, `binary_sensor.phyn_leak_test_running`, `repairs.create` |
| [powerwall.yaml](powerwall.yaml) | Track Tesla Powerwall grid status and shed loads automatically when off-grid (alerts include Activity feed + Repairs). | `binary_sensor.powerwall_grid_status`, `sensor.powerwall_*`, `repairs.create` |
| [vacuum.yaml](vacuum.yaml) | Dreame vacuum orchestration with room tracking, push alerts, Activity feed, and Repairs issues on errors. | `input_select.l10s_vacuum_phase`, `sensor.l10s_vacuum_error`, `repairs.create` |
| [hass_agent_homepc.yaml](hass_agent_homepc.yaml) | Mirrors PC lock/unlock state from HASS.Agent to the office lamp for instant desk presence cues. | `sensor.carlo_homepc_carlo_homepc_sessionstate`, `switch.office_lamp_switch` |
| [finance.yaml](finance.yaml) | Yahoo Finance sensor bundle for portfolio glances and Lovelace cards. | `sensor.tsla`, `sensor.aapl`, `sensor.amzn`, `sensor.msft` |

View File

@@ -4,6 +4,7 @@
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Alarm Package - Arming helpers, sensors, and alerting.
# Related Issue: 1550
# Alarm sensors, customization, and automations for home security.
# -------------------------------------------------------------------
# Notes: Turns HVAC off when doors/windows are open and restores cool mode after closure.
@@ -340,6 +341,10 @@ automation:
from: 'on'
action:
- service: script.send_to_logbook
data:
topic: "SECURITY"
message: "Alarm panel door opened."
- service: script.notify_engine
data:
value1: 'Someone has opened up the Alarm Panel Door!'

View File

@@ -46,6 +46,10 @@ automation:
title: 'Low Battery'
value1: 'The August Door lock is at {{ states("sensor.front_door_battery") }}% '
group: 'Battery_Alert'
- service: script.send_to_logbook
data:
topic: "BATTERY"
message: "August Door lock battery low: {{ states('sensor.front_door_battery') }}%"
- alias: 'FrontDoor Bell Camera on Front Door Lock'
id: Doorbell_camera_front_door

View File

@@ -134,6 +134,10 @@ script:
entity_id: group.family
state: 'not_home'
sequence:
- service: script.send_to_logbook
data:
topic: "CLIMATE"
message: "Downstairs HVAC set to ECO (family not_home)."
- service: climate.set_preset_mode
data:
entity_id: climate.downstairs
@@ -148,6 +152,10 @@ script:
entity_id: sensor.pirateweather_temperature
above: 92
sequence:
- service: script.send_to_logbook
data:
topic: "CLIMATE"
message: "Downstairs target set to 78F (family home, temp >92F)."
- service: climate.set_hvac_mode
data:
entity_id: climate.downstairs
@@ -161,6 +169,10 @@ script:
entity_id: group.family
state: 'home'
sequence:
- service: script.send_to_logbook
data:
topic: "CLIMATE"
message: "Downstairs target set to 80F (family home)."
- service: climate.set_hvac_mode
data:
entity_id: climate.downstairs
@@ -183,6 +195,11 @@ automation:
entity_id: sensor.downstairs_ac_runtime_since_last_filter_change
above: 800 # hours
action:
- service: script.send_to_logbook
data:
topic: "MAINTENANCE"
message: >-
Downstairs AC filter due (runtime >800h). Last changed {{ ((now() - states.input_datetime.downstairs_last_filter_change.last_changed).total_seconds() / 86400) | round(0) }} days ago.
- service: script.notify_engine # <-- keep your existing notify helper
data:
title: "Home Maintenance Reminder"
@@ -200,6 +217,11 @@ automation:
entity_id: sensor.upstairs_ac_runtime_since_last_filter_change
above: 450 # hours
action:
- service: script.send_to_logbook
data:
topic: "MAINTENANCE"
message: >-
Upstairs AC filter due (runtime >450h). Last changed {{ ((now() - states.input_datetime.upstairs_last_filter_change.last_changed).total_seconds() / 86400) | round(0) }} days ago.
- service: script.notify_engine
data:
title: "Home Maintenance Reminder"
@@ -245,6 +267,10 @@ automation:
data:
entity_id: climate.upstairs
temperature: 78
- service: script.send_to_logbook
data:
topic: "CLIMATE"
message: "Upstairs target temp corrected to 78F (guardrail)."
- alias: Set Downstairs to 77 When Both in Bed
id: set_downstairs_nest_77_both_in_bed
@@ -432,4 +458,3 @@ automation:
- delay: "00:20:00"
- service: script.set_downstairs_target_temp_based_on_conditions
- delay: "02:00:00" # stops it from being triggered again too soon.

View File

@@ -105,13 +105,10 @@ automation:
entity_id: input_text.last_person_home
data:
value: "{{ trigger.to_state.entity_id.split('.')[1] }}"
- service: script.notify_engine
- service: script.send_to_logbook
data:
who: 'parents'
value1: "Large Garage has been auto-opened for {{ states('input_text.last_person_home') }}."
title: 'Garage Auto-Opened'
group: 'Welcome_Home'
camera_entity: camera.garagecam
topic: "GARAGE"
message: "Large Garage was auto-opened for {{ states('input_text.last_person_home') }}."
######################################################################
## Entry helper prompt after arrival if auto-open didnt fire.
@@ -215,6 +212,10 @@ automation:
value1: "Unlocking for {{ trigger.to_state.name }} arriving from driving."
who: "family"
group: "Welcome_Home"
- service: script.send_to_logbook
data:
topic: "DOORS"
message: "Front door auto-unlocked for {{ trigger.to_state.name }} arriving from driving."
######################################################################

View File

@@ -1,12 +1,14 @@
#-------------------------------------------
# @CCOSTAN
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Lightning Alerts - Monitor nearby strikes and notify.
#-------------------------------------------
# -------------------------------------------------------------------
# Lightning Alerts - Nearby strike warnings and snooze workflow
# Related Issue: 1550
# Keeps push alerts but also logs to Activity feed.
# -------------------------------------------------------------------
# Guide: https://www.vcloudinfo.com/2020/08/adding-a-lightning-sensor-to-home-assistant.html | Existing Issue #392
######################################################################
## Lightning sensor integration and alerting.
######################################################################
# Guide: https://www.vcloudinfo.com/2020/08/adding-a-lightning-sensor-to-home-assistant.html | Issue #392
input_boolean:
snooze_lightning:
name: Snooze Lightning
@@ -45,6 +47,11 @@ automation:
state: 'off'
action:
- service: script.send_to_logbook
data:
topic: "WEATHER"
message: >-
Lightning detected within {{ (states('sensor.blitzortung_lightning_distance') | int / 1.609) | round(1, 'floor') }} miles.
- service: script.notify_engine_two_button
data:
title: 'Lightning Warning!'

View File

@@ -0,0 +1,18 @@
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Logbook Activity Feed - Dummy entity for Activity pseudo-filtering
# Related Issue: 1550
# Provides `sensor.activity_feed` as a stable entity_id for `logbook.log`.
# -------------------------------------------------------------------
######################################################################
template:
- sensor:
- name: Activity Feed
unique_id: activity_feed
icon: mdi:clipboard-text
state: "ready"

View File

@@ -1,14 +1,15 @@
#-------------------------------------------
# @CCOSTAN
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Phyn Plus Water Shutoff - Leak detection and auto shutoff.
#-------------------------------------------
######################################################################
## Phyn Plus monitoring via custom integration.
######################################################################
# -------------------------------------------------------------------
# Phyn Plus Water Shutoff - Leak detection and auto shutoff
# Related Issue: 1550
# Push + Activity feed + Repairs issue while valve is closed.
# -------------------------------------------------------------------
# Info: https://www.vcloudinfo.com/2020/05/phyn-plus-smart-water-shutoff-device.html
# HACS: https://github.com/MizterB/homeassistant-phyn
## Phyn Plus Water ShutOff - https://amzn.to/2Zy3sbJ
# Product: https://amzn.to/2Zy3sbJ
######################################################################
automation:
@@ -27,6 +28,22 @@ automation:
state: 'off'
action:
- service: script.send_to_logbook
data:
topic: "WATER"
message: "Phyn detected a leak and shut off the water. Please verify."
- service: repairs.create
data:
issue_id: "phyn_leak_shutoff"
title: "Phyn leak shutoff"
severity: "critical"
persistent: true
description: >-
Phyn detected a potential leak and automatically closed the main water valve.
Verify there are no active leaks before restoring water service.
- service: script.notify_engine_two_button
data:
title: 'Phyn Leak Detection'
@@ -107,8 +124,11 @@ automation:
entity_id: valve.phyn_shutoff_valve
to: 'open'
action:
- service: repairs.remove
continue_on_error: true
data:
issue_id: "phyn_leak_shutoff"
- service: persistent_notification.dismiss
data:
notification_id: 'phyn_leak_detection'

View File

@@ -1,14 +1,15 @@
#-------------------------------------------
# @CCOSTAN
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Tesla Powerwall - Monitoring and outage automations.
#-------------------------------------------
######################################################################
## Powerwall status sensors and load-shedding helpers.
######################################################################
# Read more: https://www.vcloudinfo.com/2018/01/going-green-to-save-some-green-in-2018.html | Issue #272
# -------------------------------------------------------------------
# Tesla Powerwall - Monitoring and outage automations
# Related Issue: 1550
# Powerwall status sensors, outage alerting, and load-shedding helpers.
# -------------------------------------------------------------------
# Notes: Read more https://www.vcloudinfo.com/2018/01/going-green-to-save-some-green-in-2018.html | Existing Issue #272
# Tesla Powerwall added via UI Integration
# --------------------------------------------------------------
######################################################################
# Binary Sensors:
# - binary_sensor.powerwall_charging ............. battery_charging (on=charging)
# - binary_sensor.powerwall_connected_to_tesla ... connectivity (on=connected)
@@ -54,6 +55,11 @@ automation:
trigger.from_state.state not in ['unavailable', 'unknown', 'null'] }}
action:
- service: script.send_to_logbook
data:
topic: "POWER"
message: >-
Grid status is {{ (trigger.to_state.state)|replace('on', 'up')|replace('off', 'down') }}.
- service: script.notify_engine
data:
title: "Electrical Grid Status {{ (trigger.to_state.state)|replace('on', 'up')|replace('off', 'down') }}."
@@ -124,6 +130,22 @@ automation:
entity_id: binary_sensor.powerwall_grid_status
state: 'on'
action:
- service: script.send_to_logbook
data:
topic: "POWER"
message: "Powerwall charge below 60% for 24h (current: {{ states('sensor.powerwall_charge') }}%)."
- service: repairs.create
data:
issue_id: "powerwall_low_charge_60_24h"
title: "Powerwall charge low for 24h"
severity: "warning"
persistent: true
description: >-
Powerwall has been below 60% for 24 hours while the grid is online.
Current charge: {{ states('sensor.powerwall_charge') }}%.
- service: script.notify_engine
data:
title: "Powerwall Low Charge Alert - Current Charge: {{ states('sensor.powerwall_charge') }}"
@@ -131,6 +153,29 @@ automation:
who: 'parents'
group: 'information'
- alias: "Powerwall Low Charge Resolved - Clear Repair Issue"
id: 5fd1f0b3-0e64-4a4b-bd7a-9f5d5e6b8f90
mode: single
trigger:
- platform: numeric_state
entity_id: sensor.powerwall_charge
above: 60
for:
minutes: 10
condition:
- condition: state
entity_id: binary_sensor.powerwall_grid_status
state: 'on'
action:
- service: repairs.remove
continue_on_error: true
data:
issue_id: "powerwall_low_charge_60_24h"
- service: script.send_to_logbook
data:
topic: "POWER"
message: "Powerwall charge recovered above 60%. Cleared repair issue."
- alias: "Shut down Docker hosts and camera PoE at 75% Powerwall"
id: 25b3d3d8-92fa-454a-9f1c-6d3fd0f3af58
description: "Protect battery by shutting down non-essentials when Powerwall drops below 75%"

View File

@@ -54,5 +54,15 @@ automation:
data:
type: announce
- service: script.send_to_logbook
data:
topic: "PRINTER"
message: >
{% if trigger.to_state.state == 'idle' %}
Printer has powered on and is ready
{% else %}
Printer is now printing
{% endif %}
#-------------------------------------------

View File

@@ -35,6 +35,10 @@ automation:
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_percent.state }}%!"
value3: 'Attempting to clean'
who: 'carlo'
- service: script.send_to_logbook
data:
topic: "SYSTEM"
message: "Disk usage exceeded 80% (/dev/root: {{ states.sensor.disk_use_percent.state }}%). Attempting to clean."
- service: tts.clear_cache
- alias: "Disk Use Alarm"
@@ -49,3 +53,7 @@ automation:
value1: 'Hard Drive Monitor:'
value2: "Your harddrive is running out of Space! /dev/root:{{ states.sensor.disk_use_percent.state }}%!"
who: 'carlo'
- service: script.send_to_logbook
data:
topic: "SYSTEM"
message: "Disk usage exceeded 90% (/dev/root: {{ states.sensor.disk_use_percent.state }}%)."

View File

@@ -20,6 +20,10 @@ automation:
- service: button.press
target:
entity_id: button.qemu_docker2_101_reboot
- service: script.send_to_logbook
data:
topic: "FRIGATE"
message: "Frigate server rebooted at 5 AM."
- alias: "Proxmox Updates Repair Issues"
id: proxmox_updates_repair
@@ -56,3 +60,7 @@ automation:
- service: repairs.remove
data:
issue_id: "{{ issue_id }}"
- service: script.send_to_logbook
data:
topic: "PROXMOX"
message: "{{ node_name }} has been Patched"

View File

@@ -1,13 +1,15 @@
#-------------------------------------------
# @CCOSTAN
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Rheem EcoNet Water Heater - Monitoring and control.
#-------------------------------------------
######################################################################
## Rheem EcoNet sensors/automations. https://amzn.to/36yOSnN
######################################################################
# Docs: https://www.home-assistant.io/integrations/econet/ | Issue #892
# -------------------------------------------------------------------
# Rheem EcoNet Water Heater - Monitoring and control
# Related Issue: 1550
# Logs hot-water availability alerts to Activity feed; keeps announcements.
# -------------------------------------------------------------------
# Docs: https://www.home-assistant.io/integrations/econet/ | Existing notes: Issue #892
# Powerwall outage control for Rheem WH lives in config/packages/powerwall.yaml
######################################################################
##############################################################################
### Automations
@@ -51,15 +53,13 @@ automation:
entity_id: sensor.rheem_wh_available_hot_water
below: 30 # Alert when available hot water drops below 30%
action:
- service: script.notify_engine
- service: script.send_to_logbook
data:
title: "Hot Water Alert"
value1: "Available hot water is below 30%."
who: 'carlo'
group: 'information'
topic: "WATER"
message: "Hot water availability is below 30%."
- service: script.speech_engine
data:
value1: "Please be aware that the hot water has dropped below 30% availability. Please consider taking a shower at another time. Gallons used today: {{sensor.phyn_daily_water_usage}}"
value1: "Please be aware that the hot water has dropped below 30% availability. Gallons used today: {{sensor.phyn_daily_water_usage}}"
- service: notify.alexa_media_master_bathroom
data:
@@ -97,4 +97,3 @@ automation:
# water_heater.rheem_wh

View File

@@ -1,17 +1,18 @@
#-------------------------------------------
# @CCOSTAN
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Speedtest Alerts - Notify when internet speeds drop.
#-------------------------------------------
# -------------------------------------------------------------------
# Speedtest Alerts - Log internet speed drops/restores to Activity feed
# Related Issue: 1550
# Uses `script.send_to_logbook` + `sensor.activity_feed`.
# -------------------------------------------------------------------
######################################################################
## Alerts if download/upload fall below thresholds.
######################################################################
# For more info or questions, visit https://www.vcloudinfo.com/click-here
automation:
- alias: "Notify Carlo if Internet Speed is Slow"
- alias: "Internet Speed is Slow (Logbook)"
id: notify-carlo-slow-internet-speed
description: "Sends a notification to Carlo's phone if download or upload speed falls below 400 Mbps."
description: "Logs an Activity entry if download or upload speed falls below 300 Mbps."
trigger:
- platform: numeric_state
entity_id: sensor.speedtest_download
@@ -31,21 +32,18 @@ automation:
{{ (now - uptime).total_seconds() / 60 >= 10 }}
action:
- service: script.notify_engine
- service: script.send_to_logbook
data:
title: "⚠️ Internet Speed Alert"
value1: >-
topic: "NETWORK"
message: >-
Download: {{ states('sensor.speedtest_download') }} Mbps,
Upload: {{ states('sensor.speedtest_upload') }} Mbps.
value2: "One or both speeds are below 300 Mbps."
who: "carlo"
group: "information"
level: "active"
One or both speeds are below 300 Mbps.
mode: single
- alias: "Notify Carlo if Internet Speed is Restored"
- alias: "Internet Speed Restored (Logbook)"
id: notify-carlo-internet-speed-restored
description: "Sends a notification to Carlo's phone when download and upload speeds are back above 300/300 Mbps."
description: "Logs an Activity entry when download and upload speeds are back above 300/300 Mbps."
trigger:
- platform: numeric_state
entity_id: sensor.speedtest_download
@@ -66,14 +64,11 @@ automation:
{% set now = now() %}
{{ (now - uptime).total_seconds() / 60 >= 10 }}
action:
- service: script.notify_engine
- service: script.send_to_logbook
data:
title: "✅ Internet Speed Restored"
value1: >-
topic: "NETWORK"
message: >-
Download: {{ states('sensor.speedtest_download') }} Mbps,
Upload: {{ states('sensor.speedtest_upload') }} Mbps.
value2: "Internet speeds are back to normal."
who: "parents"
group: "information"
level: "active"
Internet speeds are back to normal.
mode: single

View File

@@ -1,21 +0,0 @@
#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# More information : https://github.com/SmilyOrg/screenmqtt
#-------------------------------------------
homeassistant:
customize:
switch.computer_screens:
friendly_name: 'Computer Screens'
icon: mdi:monitor-multiple
emulated_hue_
#-------------------------------------------
button:
- platform: mqtt
name: computer_screens
state_topic: 'carlo-ultra/monitor/all/power/state'
command_topic: 'carlo-ultra/monitor/all/power/command'
#-------------------------------------------
#group - Added to group.interior_switches

View File

@@ -4,6 +4,7 @@
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Dreame Vacuum Orchestration - Continuous phased sweep/mop with away/on-demand
# Related Issue: 1550
# Phases: sweep main, sweep baths, mop main, mop baths; notifications + idle auto-start
# -------------------------------------------------------------------
######################################################################
@@ -261,16 +262,10 @@ automation:
entity_id: input_text.l10s_vacuum_rooms_cleaned_today
data:
value: "{{ updated_cleaned }}"
- service: script.notify_engine
- service: script.send_to_logbook
data:
title: 'Vacuum Room Cleaned'
value1: "{{ room_name }} is clean."
value2: "Remaining: {{ remaining_count }}."
ios_category: 'camera'
camera_entity: 'camera.l10s_vacuum_map'
content_type: 'jpeg'
who: 'carlo'
group: 'information'
topic: "VACUUM"
message: "{{ room_name }} is clean. Remaining: {{ remaining_count }}."
- choose:
- conditions:
- condition: template
@@ -337,6 +332,23 @@ automation:
- condition: template
value_template: "{{ states('sensor.l10s_vacuum_error') not in ['no_error', 'unavailable'] }}"
action:
- service: script.send_to_logbook
data:
topic: "VACUUM"
message: "{{ states('sensor.l10s_vacuum_error') }} - {{ states('sensor.l10s_vacuum_current_room') }}"
- service: repairs.create
data:
issue_id: "vacuum_error"
title: "Vacuum needs help"
severity: "warning"
persistent: true
description: >-
Vacuum reported an error and needs intervention.
Error: {{ states('sensor.l10s_vacuum_error') }}
Room: {{ states('sensor.l10s_vacuum_current_room') }}
- service: script.notify_engine
data:
title: 'Help vacuum'
@@ -361,3 +373,20 @@ automation:
entity_id: vacuum.l10s_vacuum
- delay: 00:20:00
- event: event_did_someone_help_vacuum_loop
- alias: "Vacuum Error Resolved - Clear Repair Issue"
id: 2a0b3f7f-2f1e-4d2d-8dd4-0f6e4e34b02b
mode: single
trigger:
- platform: state
entity_id: sensor.l10s_vacuum_error
to: 'no_error'
action:
- service: repairs.remove
continue_on_error: true
data:
issue_id: "vacuum_error"
- service: script.send_to_logbook
data:
topic: "VACUUM"
message: "Vacuum error cleared."

View File

@@ -29,6 +29,7 @@ Reusable scripts that other automations call for notifications, lighting, and sa
| File | Why it matters |
| --- | --- |
| [notify_engine.yaml](notify_engine.yaml) | Single entrypoint for rich push notifications. |
| [send_to_logbook.yaml](send_to_logbook.yaml) | Generic `logbook.log` helper for Activity feed entries (Issue #1550). |
| [speech_engine.yaml](speech_engine.yaml) | TTS/announcement orchestration with templated speech. |
| [monthly_color_scene.yaml](monthly_color_scene.yaml) | Seasonal lighting scenes used across automations. |
| [interior_off.yaml](interior_off.yaml) | One-call <20>all interior lights off<66> helper. |

View File

@@ -0,0 +1,32 @@
######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Send To Logbook - Generic helper for Activity/logbook entries
# Related Issue: 1550
# Calls `logbook.log` using `sensor.activity_feed` as the entity_id.
# -------------------------------------------------------------------
######################################################################
send_to_logbook:
alias: Send To Logbook
mode: queued
fields:
topic:
description: Logbook entry name (headline)
example: "n8n"
message:
description: Logbook entry message
example: "Webhook received and workflow started."
sequence:
- condition: template
value_template: >-
{{ topic is defined and (topic | string | trim) != '' and
message is defined and (message | string | trim) != '' }}
- service: logbook.log
data:
name: "{{ topic | string | trim }}"
message: "{{ message | string | trim }}"
entity_id: sensor.activity_feed

View File

@@ -1,51 +0,0 @@
<h1 align="center">
<a name="logo" href="https://www.vCloudInfo.com/tag/iot"><img src="https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/x_profile.png" alt="Bear Stone Smart Home" width="200"></a>
<br>
Bear Stone Smart Home Documentation
</h1>
<h4 align="center">Be sure to :star: my configuration repo so you can keep up to date on any daily progress!</h4>
<div align="center">
[![X Follow](https://img.shields.io/static/v1?label=talk&message=3k&color=blue&logo=twitter&style=for-the-badge)](https://x.com/ccostan)
[![YouTube Subscribe](https://img.shields.io/youtube/channel/subscribers/UC301G8JJFzY0BZ_0lshpKpQ?label=VIEW&logo=Youtube&logoColor=%23DF5D44&style=for-the-badge)](https://www.youtube.com/vCloudInfo?sub_confirmation=1)
[![GitHub Stars](https://img.shields.io/github/stars/CCOSTAN/Home-AssistantConfig?label=STARS&logo=Github&style=for-the-badge)](https://github.com/CCOSTAN) <br>
[![HA Version Badge](https://raw.githubusercontent.com/ccostan/home-assistantconfig/master/ha-version-badge.svg)](https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/config/.HA_VERSION)
[![Last Commit](https://img.shields.io/github/last-commit/CCOSTAN/Home-AssistantConfig.svg?style=plastic)](https://github.com/CCOSTAN/Home-AssistantConfig/commits/master)
[![Commit Activity](https://img.shields.io/github/commit-activity/y/CCOSTAN/Home-AssistantConfig.svg?style=plastic)](https://github.com/CCOSTAN/Home-AssistantConfig/commits/master)
</div>
Shell commands Home Assistant can call for maintenance or integrations that need a CLI nudge.
### Quick navigation
- [Repo overview](../../README.md) | [Config index](../README.md) | [Shell scripts](../shell_scripts)
![Home Assistant header](https://i.imgur.com/vjDH1LJ.png)
### Featured files to browse
| File | Why it matters |
| --- | --- |
| [flush_pm2_logs.yaml](flush_pm2_logs.yaml) | Quick cleanup for PM2 log files. |
| [restart_homebridge.yaml](restart_homebridge.yaml) | One-shot command to restart Homebridge. |
### Tips
- Keep commands idempotent and fast; HA will run them synchronously.
- Store long scripts in `shell_scripts/` and trigger them from here.
**All of my configuration files are tested against the most stable version of home-assistant.**
<a name="bottom" href="https://github.com/CCOSTAN/Home-AssistantConfig#logo"><img align="right" border="0" src="https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/www/custom_ui/floorplan/images/branding/up_arrow.png" width="25" ></a>
**Still have questions on my Config?** <br>
**Message me on X :** [![Follow CCostan](https://img.shields.io/twitter/follow/CCostan)](https://www.x.com/ccostan)
<p align="center">
<a target="_blank" href="https://www.buymeacoffee.com/vCloudInfo"><img src="https://www.buymeacoffee.com/assets/img/BMC-btn-logo.svg" alt="Buy me a coffee"><span style="margin-left:5px">You can buy me a coffee</span></a><a target="_blank" href="https://www.buymeacoffee.com/vCloudInfo"><img src="https://www.buymeacoffee.com/assets/img/BMC-btn-logo.svg" alt="Buy me a coffee"></a>
<br>
<a href="https://eepurl.com/dmXFYz"><img align="center" border="0" src="https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/www/custom_ui/floorplan/images/branding/email_link.png" height="50" ></a><br>
<a href="https://www.vCloudInfo.com/p/affiliate-disclosure.html">
Affiliate Disclosure
</a></p>

View File

@@ -1,2 +0,0 @@
flush_pm2_logs: >-
sudo -u pi -H /usr/bin/pm2 flush

View File

@@ -1,2 +0,0 @@
restart_homebridge: >-
sudo -u pi -H /usr/bin/pm2 restart homebridge

View File

@@ -1,43 +0,0 @@
You can use this code to quickly create files from the template editor in HA. I use it mainly for `emulated_hue` and to quickly add in new Customize options to all things HA!
For the sandbox.
{% set trigger = {'entity_id':'sensor.downstairs_thermostat_hvac_state','to_state':'cooling'} %}
#########################################################
Create fast Customize for groups, sensors, covers etc... Just change that first line below 'sensor' to 'group', 'covers' etc..
{% for state in states.group -%}
{% if loop.first %}
{% elif loop.last %}
{% else %}
{% endif %}
{{- state.entity_id }}:
friendly_name: '{{ state.attributes.friendly_name|replace("_"," ",)|title() if state.attributes.friendly_name is defined else state.name|replace("_"," ",)|title() }}'
hidden: {{state.attributes.hidden if state.attributes.hidden is defined else "False"}}
homebridge_hidden: {{state.attributes.homebridge_hidden if state.attributes.homebridge_hidden is defined else "true"}}
{{'icon: '+ state.attributes.icon if state.attributes.icon is defined}}
{{'homebridge_cover_type: '+ state.attributes.homebridge_cover_type if state.attributes.homebridge_cover_type is defined}}
{{'assumed_state: '+ state.attributes.assumed_state if state.attributes.assumed_state is defined}}
{% endfor -%}
#########################################################
#This code lists out EVERY possible entity and attribute for that entity.
# source: https://github.com/skalavala/smarthome/blob/primary/Entities.md
#########################################################
{{ "_".ljust(90, "_") }}
{%- set domains = [states.light, states.switch, states.automation, states.device_tracker, states.group, states.media_player, states.proximity, states.script, states.zone, states.zwave, states.sensor, states.calendar ] %}
{{ "Entity ID".ljust(50) }}{{ "Entity Name" }}
{%- for domain in domains -%}
{% for item in domain %}
{{ "_".ljust(90, "_") }}
{{ item.entity_id.ljust(50) }}{{ item.name }}
{% for attrib in item.attributes %}
{%- if attrib is defined %}
{{attrib.ljust(50)}}: {{ item.attributes[attrib] }}
{%- endif %}
{%- endfor %}
{%- endfor %}
{%- endfor %}
#########################################################

View File

@@ -1,12 +0,0 @@
#!/bin/bash
cd /home/hass/docker_files
docker-compose exec home-assistant python -m homeassistant --config /config --script check_config
cd /home/hass/docker_files/homeassistant
git pull origin master
cd /home/hass/docker_files
docker-compose exec home-assistant python -m homeassistant --config /config --script check_config
cd ~
exit

View File

@@ -1,16 +0,0 @@
#!/bin/bash
cd /home/hass/docker_files
docker-compose exec home-assistant python -m homeassistant --config /config --script check_config
cd /home/hass/docker_files/homeassistant
git add .
git status
echo -n "Enter the Description for the Change: [Minor Edit] "
read CHANGE_MSG
CHANGE_MSG=${CHANGE_MSG:-Minor Edit}
git commit -m "${CHANGE_MSG}"
git push origin master
cd ~
exit

View File

@@ -1,17 +0,0 @@
## These scripts are run from /home/pi
#!/bin/bash
cat hassuser
sudo su -s /bin/bash hass
# source /srv/hass/hass_venv/bin/activate
# to Upgrade:
# pip3 install --upgrade homeassistant - Use HAUpdate.sh script
# To view The HA logs realtime
# sudo journalctl -u home-assistant -f | ccze

View File

@@ -1,6 +0,0 @@
# Restart Homebridge on HASS start
# shell_command:
# restart_homebridge: 'sudo su pi -c "pm2 restart homebridge"'
# start_homebridge: 'sudo su pi -c "pm2 start homebridge"'
# stop_homebridge: 'sudo su pi -c "pm2 stop homebridge"'

View File

@@ -1,23 +0,0 @@
#!/bin/sh
# this script uses hard-coded paths
# This deletes the readme file and begins rebuilding it..
cat /home/hass/.homeassistant/script/header.md > /home/hass/.homeassistant/script/README.md
grep -e '^[a-z]' /home/hass/.homeassistant/script/*.yaml | tr : '\n' > /tmp/scriptnames.txt
sed -i '/^$/d' /tmp/scriptnames.txt
for item in `cat /tmp/scriptnames.txt`
do
res=`grep -R script.$item /home/hass/.homeassistant/. --include=*.yaml`
echo "\n $item \n" | sed 's|/home/hass/\.homeassistant/| https://github\.com/CCOSTAN/Home-AssistantConfig/blob/master/|g'>> /home/hass/.homeassistant/script/README.md
echo "\n $res \n" | sed 's|/home/hass/\.homeassistant/\.| https://github\.com/CCOSTAN/Home-AssistantConfig/blob/master|g' >> /home/hass/.homeassistant/script/README.md
sed -i '/^$/d' /home/hass/.homeassistant/script/README.md
done
cat /home/hass/.homeassistant/script/README.md

View File

@@ -1,44 +0,0 @@
<h1 align="center">
<a name="logo" href="https://www.vCloudInfo.com/tag/iot"><img src="https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/x_profile.png" alt="Bear Stone Smart Home" width="200"></a>
<br>
Bear Stone Smart Home Documentation
</h1>
<h4 align="center">Be sure to :star: my configuration repo so you can keep up to date on any daily progress!</h4>
<div align="center">
[![X Follow](https://img.shields.io/static/v1?label=talk&message=3k&color=blue&logo=twitter&style=for-the-badge)](https://x.com/ccostan)
[![YouTube Subscribe](https://img.shields.io/youtube/channel/subscribers/UC301G8JJFzY0BZ_0lshpKpQ?label=VIEW&logo=Youtube&logoColor=%23DF5D44&style=for-the-badge)](https://www.youtube.com/vCloudInfo?sub_confirmation=1)
[![GitHub Stars](https://img.shields.io/github/stars/CCOSTAN/Home-AssistantConfig?label=STARS&logo=Github&style=for-the-badge)](https://github.com/CCOSTAN) <br>
[![HA Version Badge](https://raw.githubusercontent.com/ccostan/home-assistantconfig/master/ha-version-badge.svg)](https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/config/.HA_VERSION)
[![Last Commit](https://img.shields.io/github/last-commit/CCOSTAN/Home-AssistantConfig.svg?style=plastic)](https://github.com/CCOSTAN/Home-AssistantConfig/commits/master)
[![Commit Activity](https://img.shields.io/github/commit-activity/y/CCOSTAN/Home-AssistantConfig.svg?style=plastic)](https://github.com/CCOSTAN/Home-AssistantConfig/commits/master)
</div>
Standalone switch definitions pulled into automations and dashboards. Keep relays, templates, and rest commands tidy here.
### Quick navigation
- [Repo overview](../../README.md) | [Config index](../README.md) | [Automations](../automation)
![Home Assistant header](https://i.imgur.com/vjDH1LJ.png)
### Tips
- Add new switches here and reference them from packages/automations to stay organized.
**All of my configuration files are tested against the most stable version of home-assistant.**
<a name="bottom" href="https://github.com/CCOSTAN/Home-AssistantConfig#logo"><img align="right" border="0" src="https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/www/custom_ui/floorplan/images/branding/up_arrow.png" width="25" ></a>
**Still have questions on my Config?** <br>
**Message me on X :** [![Follow CCostan](https://img.shields.io/twitter/follow/CCostan)](https://www.x.com/ccostan)
<p align="center">
<a target="_blank" href="https://www.buymeacoffee.com/vCloudInfo"><img src="https://www.buymeacoffee.com/assets/img/BMC-btn-logo.svg" alt="Buy me a coffee"><span style="margin-left:5px">You can buy me a coffee</span></a><a target="_blank" href="https://www.buymeacoffee.com/vCloudInfo"><img src="https://www.buymeacoffee.com/assets/img/BMC-btn-logo.svg" alt="Buy me a coffee"></a>
<br>
<a href="https://eepurl.com/dmXFYz"><img align="center" border="0" src="https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/config/www/custom_ui/floorplan/images/branding/email_link.png" height="50" ></a><br>
<a href="https://www.vCloudInfo.com/p/affiliate-disclosure.html">
Affiliate Disclosure
</a></p>