added debugger support

This commit is contained in:
2026-04-16 19:54:29 +02:00
parent 8dbc133824
commit a317b07c19
4 changed files with 35 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
debugger:
module: debugger
class: Debugger
port: 5678
motion_tracker:
module: motiontracker
class: MotionTracker

12
apps/debugger.py Normal file
View File

@@ -0,0 +1,12 @@
import appdaemon.plugins.hass.hassapi as hass
import debugpy
class Debugger(hass.Hass):
def initialize(self):
port = int(self.args.get("port", 5678))
try:
debugpy.listen(("0.0.0.0", port))
self.log(f"debugpy listening on port {port}")
except RuntimeError:
self.log("debugpy already listening, skipping")