Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am theque42 on github.
  • I am theque42 (https://keybase.io/theque42) on keybase.
  • I have a public key ASD554cT2YsxsIk3igMi1OqQd7dzydKzdDBOyhi9-7enowo

To claim this, I am signing this object:

@TheQue42
TheQue42 / purge_clients.py
Created February 29, 2020 08:31 — forked from shbatm/purge_clients.py
Purge Junk Unifi Clients
#!/usr/bin/env python3
import requests
from urllib.parse import urljoin
username = "REDACTED"
password = r"REDACTED"
cloud_key_ip = "192.168.1.2"
controller_port = 8443
site_name = "default"
@TheQue42
TheQue42 / problem-sensor-reporting-problems.yaml
Last active December 7, 2021 15:47
Home assistant blueprint for detecting sensors of type "problem" with an error state, such as firealarm sensors, overheat sensors on sockets etc
blueprint:
name: System wide problem detector for Iot sensors of device class "problem"
description: Regularly test all sensors with device-class 'problem' to detect if anyone indicates an error.
domain: automation
input:
repetition:
name: How often to run
description: Test is run at this intervall, in minutes. You MUST use the slash notation; 0-59 minutes.
default: '/45'
selector:
@TheQue42
TheQue42 / overload_and_overheat.yaml
Last active December 11, 2021 12:05
Home assistant blueprint for detecting over_load and over_heat sensors that are NOT defined with a device_class "problem"
blueprint:
name: System wide problem detector for Iot sensors with entity_id matching '_over'.
description: Regularly test all overload and overheat sensors, NOT classified as device_class=problem
domain: automation
input:
repetition:
name: How often to run
description: Test is run at this intervall, in minutes. You MUST use the slash notation; 0-59 minutes.
default: '/45'
selector:
@TheQue42
TheQue42 / Unavailability_Detector.yaml
Last active October 15, 2022 09:03
Report/Detect unavailable sensors and binary sensors (non)matching a regular expression
blueprint:
name: Unavailability Detector
description: Regularly test all sensors for unavailability or "unknown"-ness.
domain: automation
input:
when_hours:
name: The time pattern (hour) of when to run.
description: >
https://www.home-assistant.io/docs/automation/trigger/#time-pattern-trigger
default: '*'
@TheQue42
TheQue42 / BatteryTemp.yaml
Last active July 6, 2022 12:13
Report/Detect devices with high battery temperature
blueprint:
name: BP-Battery Temp Checker
description: Regularly test any entity with the "battery" string, for high temp!
domain: automation
input:
repetition:
name: How often to run
description: Test is run at this intervall, in minutes. You MUST use the slash notation; 0-59 minutes.
default: '/30'
selector:
@TheQue42
TheQue42 / gist:f7861cf7d2b222cb4ed7a0f3940b4176
Last active June 26, 2024 18:59
Bt Proxy For Esp32-C3 Mini
--- ORIGINAL BT PROXY DEFINITION ---
esphome:
name: btproxy1
friendly_name: BtProxy1
platformio_options:
board_build.mcu: esp32c3
board_build.variant: esp32c3
esp32:
variant: ESP32C3