mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-12-03 19:41:47 +00:00
- Updated comments in various YAML configuration files to provide clearer descriptions of functionalities and integrations. - Improved documentation for alarm, alexa_media_player, backups, blink, cbyge, climate, finance, fridge, garadget, glances, hass_agent_homepc, holiday, ios, landscape_lighting, lightning, logger, medicine, nfc_tags, noonhome, office_motion, phynplus, powerwall, printer, processmonitor, proxmox, rachio, rheem_econet, roku, sleepiq, space, speedtest, stats, superbowl, vacuum, wireless, and youtube packages. - Added relevant links and issue references where applicable to enhance user guidance and support.
96 lines
2.8 KiB
YAML
96 lines
2.8 KiB
YAML
#-------------------------------------------
|
|
# @CCOSTAN
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
|
# Wireless AP Alerts - Unifi client monitoring and repair triggers.
|
|
#-------------------------------------------
|
|
######################################################################
|
|
## Alert when APs have zero clients; create repair issues.
|
|
######################################################################
|
|
# Discussion: https://github.com/CCOSTAN/Home-AssistantConfig/issues/1534
|
|
automation:
|
|
- id: unifi_ap_no_clients_repair_combined
|
|
alias: "Unifi AP Create Repair Issue after 5m of 0 Clients"
|
|
mode: single
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.unifi_ap_office_clients
|
|
to: "0"
|
|
for: { minutes: 5 }
|
|
|
|
- platform: state
|
|
entity_id: sensor.unifi_ap_study_clients
|
|
to: "0"
|
|
for: { minutes: 5 }
|
|
|
|
- platform: state
|
|
entity_id: sensor.unifi_ap_garage_clients
|
|
to: "0"
|
|
for: { minutes: 5 }
|
|
|
|
variables:
|
|
ap_name: >
|
|
{% if trigger.entity_id == 'sensor.unifi_ap_office_clients' %}
|
|
Office
|
|
{% elif trigger.entity_id == 'sensor.unifi_ap_study_clients' %}
|
|
Study
|
|
{% else %}
|
|
Garage
|
|
{% endif %}
|
|
|
|
uptime_sensor: >
|
|
{% if trigger.entity_id == 'sensor.unifi_ap_office_clients' %}
|
|
sensor.unifi_ap_office_uptime
|
|
{% elif trigger.entity_id == 'sensor.unifi_ap_study_clients' %}
|
|
sensor.unifi_ap_study_uptime
|
|
{% else %}
|
|
sensor.unifi_ap_garage_uptime
|
|
{% endif %}
|
|
|
|
issue_id: >
|
|
{{ ap_name | lower }}_ap_no_clients
|
|
|
|
action:
|
|
- service: repairs.create
|
|
data:
|
|
issue_id: "{{ issue_id }}"
|
|
fixable: false
|
|
severity: error
|
|
title: "{{ ap_name }} AP has 0 Wi-Fi Clients"
|
|
description: >
|
|
The {{ ap_name }} Unifi AP has reported 0 connected clients for
|
|
at least 5 minutes.
|
|
Current uptime: {{ states(uptime_sensor) }}.
|
|
View and manage this AP here:
|
|
https://unifi.ui.com
|
|
|
|
- id: unifi_ap_no_clients_repair_resolved_combined
|
|
alias: "Unifi AP Resolve Repair Issue When Clients Return"
|
|
mode: single
|
|
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id:
|
|
- sensor.unifi_ap_office_clients
|
|
- sensor.unifi_ap_study_clients
|
|
- sensor.unifi_ap_garage_clients
|
|
above: 0
|
|
|
|
variables:
|
|
ap_name: >
|
|
{% if trigger.entity_id == 'sensor.unifi_ap_office_clients' %}
|
|
Office
|
|
{% elif trigger.entity_id == 'sensor.unifi_ap_study_clients' %}
|
|
Study
|
|
{% else %}
|
|
Garage
|
|
{% endif %}
|
|
|
|
issue_id: >
|
|
{{ ap_name | lower }}_ap_no_clients
|
|
|
|
action:
|
|
- service: repairs.remove
|
|
data:
|
|
issue_id: "{{ issue_id }}"
|