Browse Source

Revert "send setting always for heating valve device"

This reverts commit 54d72802c2.
tags/v1.0.0
Dirk Alders 1 year ago
parent
commit
52bb35c2c2
1 changed files with 4 additions and 7 deletions
  1. 4
    7
      devices/__init__.py

+ 4
- 7
devices/__init__.py View File

26
 
26
 
27
 """
27
 """
28
 
28
 
29
+# TODO: Usage of mqtt_base for all devices
30
+#
31
+# TODO: brennenstuhl_heatingvalve: always send "{"preset": "manual", "system_mode": "heat"}" with any information
29
 # TODO: usage of base.mqtt as parent for class base
32
 # TODO: usage of base.mqtt as parent for class base
30
 
33
 
31
 __DEPENDENCIES__ = []
34
 __DEPENDENCIES__ = []
32
 
35
 
33
-import copy
34
 import json
36
 import json
35
 import logging
37
 import logging
36
 
38
 
108
     RX_IGNORE_TOPICS = []
110
     RX_IGNORE_TOPICS = []
109
     RX_IGNORE_KEYS = []
111
     RX_IGNORE_KEYS = []
110
     RX_FILTER_DATA_KEYS = []
112
     RX_FILTER_DATA_KEYS = []
111
-    #
112
-    TX_BASE_DATA = None
113
 
113
 
114
     def __init__(self, mqtt_client, topic):
114
     def __init__(self, mqtt_client, topic):
115
         # data storage
115
         # data storage
194
             else:
194
             else:
195
                 self.logger.debug("Sending data for %s - %s", key, str(data))
195
                 self.logger.debug("Sending data for %s - %s", key, str(data))
196
                 if self.TX_TYPE == self.TX_DICT:
196
                 if self.TX_TYPE == self.TX_DICT:
197
-                    tx_data = copy.copy(self.TX_BASE_DATA or {})
198
-                    tx_data[key] = data
199
-                    self.mqtt_client.send('/'.join([self.topic, self.TX_TOPIC]), json.dumps(tx_data))
197
+                    self.mqtt_client.send('/'.join([self.topic, self.TX_TOPIC]), json.dumps({key: data}))
200
                 else:
198
                 else:
201
                     if type(data) not in [str, bytes]:
199
                     if type(data) not in [str, bytes]:
202
                         data = json.dumps(data)
200
                         data = json.dumps(data)
858
     KEY_WINDOW_DETECTION = "window_detection"
856
     KEY_WINDOW_DETECTION = "window_detection"
859
     #
857
     #
860
     TX_TYPE = base.TX_DICT
858
     TX_TYPE = base.TX_DICT
861
-    TX_BASE_DATA = {KEY_PRESET: "manual", KEY_SYSTEM_MODE: "heat"}
862
     #
859
     #
863
     RX_KEYS = [KEY_LINKQUALITY, KEY_BATTERY, KEY_HEATING_SETPOINT, KEY_TEMPERATURE]
860
     RX_KEYS = [KEY_LINKQUALITY, KEY_BATTERY, KEY_HEATING_SETPOINT, KEY_TEMPERATURE]
864
     RX_IGNORE_KEYS = [KEY_AWAY_MODE, KEY_CHILD_LOCK, KEY_PRESET, KEY_SYSTEM_MODE, KEY_VALVE_DETECTION, KEY_WINDOW_DETECTION]
861
     RX_IGNORE_KEYS = [KEY_AWAY_MODE, KEY_CHILD_LOCK, KEY_PRESET, KEY_SYSTEM_MODE, KEY_VALVE_DETECTION, KEY_WINDOW_DETECTION]

Loading…
Cancel
Save