|
@@ -14,10 +14,17 @@ class Heatpump:
|
14
|
14
|
var_types: Dict
|
15
|
15
|
last_update: int = None
|
16
|
16
|
|
17
|
|
- def __init__(self, mac_address, last_update):
|
|
17
|
+ def __init__(self, mac_address, last_update, types=[]):
|
18
|
18
|
self.mac_address = mac_address
|
19
|
19
|
self.last_update = last_update
|
20
|
|
- self.var_types = VariableType.getall()
|
|
20
|
+ if len(types):
|
|
21
|
+ self.var_types = {
|
|
22
|
+ key: val
|
|
23
|
+ for key,val in VariableType.getall().items()
|
|
24
|
+ if key in types
|
|
25
|
+ }
|
|
26
|
+ else:
|
|
27
|
+ self.var_types = VariableType.getall()
|
21
|
28
|
|
22
|
29
|
def __str__(self):
|
23
|
30
|
return str(self.__dict__())
|