-
Notifications
You must be signed in to change notification settings - Fork 2
/
AdvCrownstoneSetupState.py
26 lines (22 loc) · 1.1 KB
/
AdvCrownstoneSetupState.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
from crownstone_core.packets.serviceDataParsers.containers.elements.AdvTypes import AdvType
class AdvCrownstoneSetupState:
def __init__(self):
self.type = AdvType.SETUP_STATE
self.switchState = None
self.flags = None
self.temperature = None
self.powerFactor = None
self.powerUsageReal = None
self.powerUsageApparent = None
self.errorsBitmask = None
self.uniqueIdentifier = None
def __str__(self):
return f"{self.type}\n"\
f"switchState: {self.switchState }\n" \
f"flags: \n{self.flags }\n" \
f"temperature: {self.temperature }\n" \
f"powerFactor: {self.powerFactor }\n" \
f"powerUsageReal: {self.powerUsageReal }\n" \
f"powerUsageApparent: {self.powerUsageApparent}\n" \
f"errorBitmask: {self.errorsBitmask }\n" \
f"uniqueIdentifier: {self.uniqueIdentifier }\n"