change singleton to global

This commit is contained in:
Jonas Zeunert
2021-03-07 16:24:04 +01:00
parent 6450ee22dc
commit 62bdd68c5a
12 changed files with 25 additions and 28 deletions

View File

@@ -1,15 +1,15 @@
from networking.Networking import Networking
from __main__ import networking
class Lamp:
def __init__(self, name):
self.name = name
def activate(self):
Networking().activateLamp(self)
networking.activateLamp(self)
def deactivate(self):
Networking().deactivateLamp()
networking.deactivateLamp()
def isActivated(self):
Networking().getLamps(self)
networking.getLamps(self)

View File

@@ -1,4 +1,6 @@
from lamps.Lamp import Lamp
class LampGroup:
def __init__(self, lamps):
self.lamps = lamps