From 4de660f612dbb9616caa71cf6d58de35318da828 Mon Sep 17 00:00:00 2001 From: sqozz Date: Thu, 4 Jul 2024 23:34:33 +0200 Subject: [PATCH] Add refresh method --- vu1.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vu1.py b/vu1.py index 6afda7a..9050bcd 100644 --- a/vu1.py +++ b/vu1.py @@ -11,15 +11,18 @@ class DialServer(): self._base = joinpath(self.url, API_BASE) self.key = key self._dials = [] + self.refresh() pass - @property - def dials(self): + def refresh(self): dial_data = self._req("list") for d in dial_data: dial = Dial(self, d["uid"]) if not dial in self._dials: self._dials.append(dial) + + @property + def dials(self): return self._dials @property