This commit is contained in:
Václav Španinger 2024-12-30 12:18:21 +01:00
parent 193ab4ba44
commit f3b5689c2a
2 changed files with 3 additions and 0 deletions

View File

@ -113,6 +113,7 @@ namespace esphome {
}
}
if(print_progress == 0.0 && (bed_set_temperature!=0.0 || ext_set_temperature!=0.0)) {
//print_time_offset = print_time save print time ofset to deduct from total value send to hass
set_printer_state("PREHEATING");
}
#endif

View File

@ -35,6 +35,8 @@ class Marlin2 : public PollingComponent, public uart::UARTDevice {
std::string PrinterState;
float print_progress = 0;
double print_time_offset = 0;
#ifdef USE_SENSOR
std::vector<std::pair<std::string, sensor::Sensor *>> sensors;