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_PORT=1883
|
||||||
export MQTT_CLIENT_PREFIX="MyMQTTClient"
|
export MQTT_CLIENT_PREFIX="MyMQTTClient"
|
||||||
export BOX_TOPIC_PREFIXES='{
|
export BOX_TOPIC_PREFIXES='{
|
||||||
"high_temp": "xheating/config/high_temp/",
|
"high_temp": "heating/config/high_temp/",
|
||||||
"cmd": "xheating/command/"
|
"cmd": "heating/command/"
|
||||||
}'
|
}'
|
||||||
export CENTRAL_TOPICS='{
|
export CENTRAL_TOPICS='{
|
||||||
"general_off": "xheating/system/general_off",
|
"general_off": "heating/system/general_off",
|
||||||
"maintenance_mode": "xheating/system/maintenance_mode",
|
"maintenance_mode": "heating/system/maintenance_mode",
|
||||||
"status": "xheating/system/status"
|
"status": "heating/system/status"
|
||||||
}'
|
}'
|
||||||
export CONTEXT_TOPIC_PREFIX='xheating/context/'
|
export CONTEXT_TOPIC_PREFIX='heating/context/'
|
||||||
export STATUS_TOPIC="heating/status"
|
export STATUS_TOPIC="heating/status"
|
||||||
export OFF_TEMPERATURE="5.0"
|
export OFF_TEMPERATURE="5.0"
|
||||||
export LOW_TEMPERATURE="15.0"
|
export LOW_TEMPERATURE="15.0"
|
||||||
|
@ -76,8 +76,9 @@ class Box:
|
|||||||
case [ primary_key ] if primary_key == 'high_temp':
|
case [ primary_key ] if primary_key == 'high_temp':
|
||||||
self.context.high_temperature = payload
|
self.context.high_temperature = payload
|
||||||
case [ primary_key ] if primary_key == 'cmd':
|
case [ primary_key ] if primary_key == 'cmd':
|
||||||
if payload in ('high', 'low', 'off'):
|
p = payload.lower()
|
||||||
self.context.mode = payload
|
if p in ('high', 'low', 'off'):
|
||||||
|
self.context.mode = p
|
||||||
else:
|
else:
|
||||||
raise Exception(f"Invalid cmd '{payload}'")
|
raise Exception(f"Invalid cmd '{payload}'")
|
||||||
case [ primary_key ] if primary_key == 'overwrite_window':
|
case [ primary_key ] if primary_key == 'overwrite_window':
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import json
|
||||||
|
|
||||||
CONVERTERS = {
|
CONVERTERS = {
|
||||||
"target_temperature_output": {
|
"target_temperature_output": {
|
||||||
"max": lambda x: x,
|
"max": lambda x: x,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user