- RC35: sets setpoint temperature in type 0x3D depends on current

This commit is contained in:
Christian Weithe
2019-01-10 22:29:12 +01:00
parent cec8ced7ac
commit 7d0f3a458c

View File

@@ -165,6 +165,7 @@ void ems_init(uint8_t boiler_modelid, uint8_t thermostat_modelid) {
EMS_Thermostat.month = 0;
EMS_Thermostat.year = 0;
EMS_Thermostat.mode = 255; // dummy value
EMS_Thermostat.day_mode = 255; // dummy value
EMS_Thermostat.type_id = EMS_ID_NONE;
EMS_Thermostat.read_supported = false;
@@ -971,7 +972,7 @@ void _process_RC30StatusMessage(uint8_t * data, uint8_t length) {
void _process_RC35StatusMessage(uint8_t * data, uint8_t length) {
EMS_Thermostat.setpoint_roomTemp = ((float)data[EMS_TYPE_RC35StatusMessage_setpoint]) / (float)2;
EMS_Thermostat.curr_roomTemp = _toFloat(EMS_TYPE_RC35StatusMessage_curr, data);
EMS_Thermostat.day_mode = bitRead(data[EMS_OFFSET_RC35Get_mode_day], 1); //get day mode flag
EMS_Sys_Status.emsRefreshed = true; // triggers a send the values back to Home Assistant via MQTT
}
@@ -1563,7 +1564,12 @@ void ems_setThermostatTemp(float temperature) {
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RC30StatusMessage;
} else if ((model_id == EMS_MODEL_RC35) || (model_id == EMS_MODEL_ES73)) {
EMS_TxTelegram.type = EMS_TYPE_RC35Set;
EMS_TxTelegram.offset = EMS_OFFSET_RC35Set_temp_day; // day mode only for now
if (EMS_Thermostat.day_mode == 0){
EMS_TxTelegram.offset = EMS_OFFSET_RC35Set_temp_night;
} else if (EMS_Thermostat.day_mode == 1){
EMS_TxTelegram.offset = EMS_OFFSET_RC35Set_temp_day;
}
EMS_TxTelegram.comparisonPostRead = EMS_TYPE_RC35StatusMessage;
}