From 0fee05acf7bb77e8baadd83d3fbd5f149d37c618 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Fri, 26 May 2023 09:47:20 -0700 Subject: [PATCH] Invalidate relay cache after changing config. Without this we don't see new relays after we add them. --- pnpdevice/relays.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pnpdevice/relays.py b/pnpdevice/relays.py index 7aee8a5..ae3dcd0 100644 --- a/pnpdevice/relays.py +++ b/pnpdevice/relays.py @@ -175,6 +175,7 @@ class Manager: "name": name, }) _write_config(self.configpath, self.config) + self._relays = [] def relay_set(self, relay: Relay, state: bool) -> None: if not relay.pin.chip.startswith("fake"):