-
Notifications
You must be signed in to change notification settings - Fork 1
/
.Domoticz.py
41 lines (31 loc) · 883 Bytes
/
.Domoticz.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Mock Domoticz.py
# change this values with your credentials
Parameters = {
"Mode1": 60,
"Mode2": "Debug",
"Mode3": "1.20.1",
"Username": "<YOUR_USERNAME>",
"Password": "<YOUR_PASSWORD>"
}
Devices = {}
class Device:
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
self.__dict__['sValue']=""
self.__dict__['nValue']=""
def Create(self):
print(f"Device created: {self.__dict__}")
Devices[self.__dict__['Unit']] = self
def Update(self, nValue, sValue):
print(f"Device {self.__dict__['Name']} updated: nValue={nValue}, sValue={sValue}")
@staticmethod
def Log(message):
print(f"Log: {message}")
@staticmethod
def Debug(message):
print(f"Debug: {message}")
@staticmethod
def Error(message):
print(f"Error: {message}")
def Debugging(level):
return