fix
This commit is contained in:
parent
edb739764a
commit
d314ef37e4
12
env-test
12
env-test
@ -2,15 +2,15 @@ export MQTT_BROKER="172.23.1.102"
|
||||
export MQTT_PORT=1883
|
||||
export MQTT_CLIENT_PREFIX="MyMQTTClient"
|
||||
export BOX_TOPIC_PREFIXES='{
|
||||
"high_temp": "xheating/config/high_temp/",
|
||||
"cmd": "xheating/command/"
|
||||
"high_temp": "heating/config/high_temp/",
|
||||
"cmd": "heating/command/"
|
||||
}'
|
||||
export CENTRAL_TOPICS='{
|
||||
"general_off": "xheating/system/general_off",
|
||||
"maintenance_mode": "xheating/system/maintenance_mode",
|
||||
"status": "xheating/system/status"
|
||||
"general_off": "heating/system/general_off",
|
||||
"maintenance_mode": "heating/system/maintenance_mode",
|
||||
"status": "heating/system/status"
|
||||
}'
|
||||
export CONTEXT_TOPIC_PREFIX='xheating/context/'
|
||||
export CONTEXT_TOPIC_PREFIX='heating/context/'
|
||||
export STATUS_TOPIC="heating/status"
|
||||
export OFF_TEMPERATURE="5.0"
|
||||
export LOW_TEMPERATURE="15.0"
|
||||
|
@ -76,8 +76,9 @@ class Box:
|
||||
case [ primary_key ] if primary_key == 'high_temp':
|
||||
self.context.high_temperature = payload
|
||||
case [ primary_key ] if primary_key == 'cmd':
|
||||
if payload in ('high', 'low', 'off'):
|
||||
self.context.mode = payload
|
||||
p = payload.lower()
|
||||
if p in ('high', 'low', 'off'):
|
||||
self.context.mode = p
|
||||
else:
|
||||
raise Exception(f"Invalid cmd '{payload}'")
|
||||
case [ primary_key ] if primary_key == 'overwrite_window':
|
||||
|
@ -1,3 +1,5 @@
|
||||
import json
|
||||
|
||||
CONVERTERS = {
|
||||
"target_temperature_output": {
|
||||
"max": lambda x: x,
|
||||
|
Loading…
x
Reference in New Issue
Block a user