Compare commits

...

2 Commits

2 changed files with 94 additions and 4 deletions

View File

@@ -0,0 +1,90 @@
# Wireless AP client alert configurations
# See related discussion: https://github.com/CCOSTAN/Home-AssistantConfig/issues/1534
# This file contains sensors and alerts for tracking Unifi AP clients.
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 }}"

View File

@@ -1,13 +1,13 @@
<svg width="68.5" height="20" viewBox="0 0 685 200" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="2025.11.2">
<title>2025.11.2</title>
<linearGradient id="VWcxb" x2="0" y2="100%">
<linearGradient id="Fdmcs" x2="0" y2="100%">
<stop offset="0" stop-opacity=".1" stop-color="#EEE"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="aQeby"><rect width="685" height="200" rx="30" fill="#FFF"/></mask>
<g mask="url(#aQeby)">
<mask id="NvMYP"><rect width="685" height="200" rx="30" fill="#FFF"/></mask>
<g mask="url(#NvMYP)">
<rect width="685" height="200" fill="#08C" x="0"/>
<rect width="685" height="200" fill="url(#VWcxb)"/>
<rect width="685" height="200" fill="url(#Fdmcs)"/>
</g>
<g aria-hidden="true" fill="#fff" text-anchor="start" font-family="Verdana,DejaVu Sans,sans-serif" font-size="110">
<text x="65" y="148" textLength="570" fill="#000" opacity="0.25">2025.11.2</text>

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 815 B