diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index b6b57df4c..686a5c80d 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -174,6 +174,12 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i for (uint8_t i = 0; i < monitor_typeids.size(); i++) { EMSESP::send_read_request(monitor_typeids[i], device_id); } + // HA will report an error in the climate component if it doesn't have the setpoint temp, current temperatures and the mode (e.g. auto) + // The mode always comes later (1 minute) so we force a read request to suppress HA errors. + // I remember having this in before, but we removed it and can't remember why? + for (uint8_t i = 0; i < set_typeids.size(); i++) { + EMSESP::send_read_request(set_typeids[i], device_id); + } EMSESP::send_read_request(0x12, device_id); // read last error (only published on errors) } @@ -229,7 +235,6 @@ std::shared_ptr Thermostat::heating_circuit(const ui // returns pointer to the HeatingCircuit or nullptr if it can't be found // if its a new one, the object will be created and also the fetch flags set std::shared_ptr Thermostat::heating_circuit(std::shared_ptr telegram) { - // look through the Monitor and Set arrays to see if there is a match uint8_t hc_num = 0; bool toggle_ = false;