Files
ad_trident/apps/debugger.py
2026-04-16 19:54:29 +02:00

13 lines
370 B
Python

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")