mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
request thermostat mode on boot - see inline comments
This commit is contained in:
@@ -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++) {
|
for (uint8_t i = 0; i < monitor_typeids.size(); i++) {
|
||||||
EMSESP::send_read_request(monitor_typeids[i], device_id);
|
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)
|
EMSESP::send_read_request(0x12, device_id); // read last error (only published on errors)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,7 +235,6 @@ std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(const ui
|
|||||||
// returns pointer to the HeatingCircuit or nullptr if it can't be found
|
// 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
|
// if its a new one, the object will be created and also the fetch flags set
|
||||||
std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::shared_ptr<const Telegram> telegram) {
|
std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
|
||||||
// look through the Monitor and Set arrays to see if there is a match
|
// look through the Monitor and Set arrays to see if there is a match
|
||||||
uint8_t hc_num = 0;
|
uint8_t hc_num = 0;
|
||||||
bool toggle_ = false;
|
bool toggle_ = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user