mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
@@ -1,9 +1,9 @@
|
||||
- platform: mqtt
|
||||
name: Thermostat
|
||||
modes:
|
||||
- low
|
||||
- manual
|
||||
- auto
|
||||
- "auto"
|
||||
- "manual"
|
||||
- "off"
|
||||
|
||||
mode_state_topic: "home/ems-esp/thermostat_data"
|
||||
current_temperature_topic: "home/ems-esp/thermostat_data"
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
- platform: mqtt
|
||||
name: boiler
|
||||
modes:
|
||||
- "on"
|
||||
- "off"
|
||||
min_temp: 40
|
||||
max_temp: 60
|
||||
temp_step: 1
|
||||
@@ -28,3 +31,6 @@
|
||||
temperature_command_topic: "home/ems-esp/boiler_cmd_wwtemp"
|
||||
current_temperature_template: "{{ value_json.wWCurTmp }}"
|
||||
temperature_state_template: "{{ value_json.wWSelTemp }}"
|
||||
mode_state_template: "{{ value_json.wWActivated }}"
|
||||
mode_state_topic: "home/ems-esp/boiler_data"
|
||||
mode_command_topic: "home/ems-esp/wwactivated"
|
||||
|
||||
@@ -1233,18 +1233,18 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
|
||||
myDebug("MQTT topic: thermostat mode value %s", message);
|
||||
if (strcmp((char *)message, "auto") == 0) {
|
||||
ems_setThermostatMode(2);
|
||||
} else if (strcmp((char *)message, "day") == 0) {
|
||||
} else if (strcmp((char *)message, "day") == 0 || strcmp((char *)message, "manual") == 0) {
|
||||
ems_setThermostatMode(1);
|
||||
} else if (strcmp((char *)message, "night") == 0) {
|
||||
} else if (strcmp((char *)message, "night") == 0 || strcmp((char *)message, "off") == 0) {
|
||||
ems_setThermostatMode(0);
|
||||
}
|
||||
}
|
||||
|
||||
// wwActivated
|
||||
if (strcmp(topic, TOPIC_BOILER_WWACTIVATED) == 0) {
|
||||
if (message[0] == '1') {
|
||||
if (message[0] == '1' || message[0] == 'on') {
|
||||
ems_setWarmWaterActivated(true);
|
||||
} else if (message[0] == '0') {
|
||||
} else if (message[0] == '0' || message[0] == 'off') {
|
||||
ems_setWarmWaterActivated(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user