fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
Wolfgang Hottgenroth 2024-11-18 14:54:53 +01:00
parent edb739764a
commit d314ef37e4
Signed by: wn
GPG Key ID: 18FDFA577A8871AD
3 changed files with 11 additions and 8 deletions

View File

@ -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"

View File

@ -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':

View File

@ -1,3 +1,5 @@
import json
CONVERTERS = {
"target_temperature_output": {
"max": lambda x: x,