Skip to content

Instantly share code, notes, and snippets.

@JBelinchon
JBelinchon / device_tracker.py
Last active February 1, 2020 17:36
Home Assistant custom_component device tracker
"""
Tracks devices by sending a ICMP echo request (ping) and query arp table.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.ping/
"""
import logging
import subprocess
import sys
import re