Revert "send setting always for heating valve device"
This reverts commit 54d72802c253a7f137b58eb3712ea0ecb2929978.
This commit is contained in:
parent
b9adc74a82
commit
52bb35c2c2
@ -26,11 +26,13 @@ devices (DEVICES)
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# TODO: Usage of mqtt_base for all devices
|
||||||
|
#
|
||||||
|
# TODO: brennenstuhl_heatingvalve: always send "{"preset": "manual", "system_mode": "heat"}" with any information
|
||||||
# TODO: usage of base.mqtt as parent for class base
|
# TODO: usage of base.mqtt as parent for class base
|
||||||
|
|
||||||
__DEPENDENCIES__ = []
|
__DEPENDENCIES__ = []
|
||||||
|
|
||||||
import copy
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -108,8 +110,6 @@ class base(dict):
|
|||||||
RX_IGNORE_TOPICS = []
|
RX_IGNORE_TOPICS = []
|
||||||
RX_IGNORE_KEYS = []
|
RX_IGNORE_KEYS = []
|
||||||
RX_FILTER_DATA_KEYS = []
|
RX_FILTER_DATA_KEYS = []
|
||||||
#
|
|
||||||
TX_BASE_DATA = None
|
|
||||||
|
|
||||||
def __init__(self, mqtt_client, topic):
|
def __init__(self, mqtt_client, topic):
|
||||||
# data storage
|
# data storage
|
||||||
@ -194,9 +194,7 @@ class base(dict):
|
|||||||
else:
|
else:
|
||||||
self.logger.debug("Sending data for %s - %s", key, str(data))
|
self.logger.debug("Sending data for %s - %s", key, str(data))
|
||||||
if self.TX_TYPE == self.TX_DICT:
|
if self.TX_TYPE == self.TX_DICT:
|
||||||
tx_data = copy.copy(self.TX_BASE_DATA or {})
|
self.mqtt_client.send('/'.join([self.topic, self.TX_TOPIC]), json.dumps({key: data}))
|
||||||
tx_data[key] = data
|
|
||||||
self.mqtt_client.send('/'.join([self.topic, self.TX_TOPIC]), json.dumps(tx_data))
|
|
||||||
else:
|
else:
|
||||||
if type(data) not in [str, bytes]:
|
if type(data) not in [str, bytes]:
|
||||||
data = json.dumps(data)
|
data = json.dumps(data)
|
||||||
@ -858,7 +856,6 @@ class brennenstuhl_heatingvalve(base):
|
|||||||
KEY_WINDOW_DETECTION = "window_detection"
|
KEY_WINDOW_DETECTION = "window_detection"
|
||||||
#
|
#
|
||||||
TX_TYPE = base.TX_DICT
|
TX_TYPE = base.TX_DICT
|
||||||
TX_BASE_DATA = {KEY_PRESET: "manual", KEY_SYSTEM_MODE: "heat"}
|
|
||||||
#
|
#
|
||||||
RX_KEYS = [KEY_LINKQUALITY, KEY_BATTERY, KEY_HEATING_SETPOINT, KEY_TEMPERATURE]
|
RX_KEYS = [KEY_LINKQUALITY, KEY_BATTERY, KEY_HEATING_SETPOINT, KEY_TEMPERATURE]
|
||||||
RX_IGNORE_KEYS = [KEY_AWAY_MODE, KEY_CHILD_LOCK, KEY_PRESET, KEY_SYSTEM_MODE, KEY_VALVE_DETECTION, KEY_WINDOW_DETECTION]
|
RX_IGNORE_KEYS = [KEY_AWAY_MODE, KEY_CHILD_LOCK, KEY_PRESET, KEY_SYSTEM_MODE, KEY_VALVE_DETECTION, KEY_WINDOW_DETECTION]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user