mirror of
https://github.com/esphome/esphome.git
synced 2025-04-19 01:00:28 +01:00
Also ignore general error bit.
This commit is contained in:
parent
1fbed0ae75
commit
7f88304a62
@ -74,23 +74,25 @@ void MAX31855Sensor::read_data_() {
|
|||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((mem & 0x00000002) && !this->ignore_short_circuit_errors_) {
|
if (!this->ignore_short_circuit_errors_) {
|
||||||
ESP_LOGW(TAG, "Thermocouple short circuit to ground fault from MAX31855 (0x%08" PRIX32 ")", mem);
|
if (mem & 0x00000002) {
|
||||||
this->publish_state(NAN);
|
ESP_LOGW(TAG, "Thermocouple short circuit to ground fault from MAX31855 (0x%08" PRIX32 ")", mem);
|
||||||
this->status_set_warning();
|
this->publish_state(NAN);
|
||||||
return;
|
this->status_set_warning();
|
||||||
}
|
return;
|
||||||
if ((mem & 0x00000004) && !this->ignore_short_circuit_errors_) {
|
}
|
||||||
ESP_LOGW(TAG, "Thermocouple short circuit to VCC fault from MAX31855 (0x%08" PRIX32 ")", mem);
|
if (mem & 0x00000004) {
|
||||||
this->publish_state(NAN);
|
ESP_LOGW(TAG, "Thermocouple short circuit to VCC fault from MAX31855 (0x%08" PRIX32 ")", mem);
|
||||||
this->status_set_warning();
|
this->publish_state(NAN);
|
||||||
return;
|
this->status_set_warning();
|
||||||
}
|
return;
|
||||||
if (mem & 0x00010000) {
|
}
|
||||||
ESP_LOGW(TAG, "Got faulty reading from MAX31855 (0x%08" PRIX32 ")", mem);
|
if (mem & 0x00010000) {
|
||||||
this->publish_state(NAN);
|
ESP_LOGW(TAG, "Got faulty reading from MAX31855 (0x%08" PRIX32 ")", mem);
|
||||||
this->status_set_warning();
|
this->publish_state(NAN);
|
||||||
return;
|
this->status_set_warning();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decode thermocouple temperature
|
// Decode thermocouple temperature
|
||||||
|
Loading…
x
Reference in New Issue
Block a user