diff --git a/esphome/components/pcf85063/pcf85063.cpp b/esphome/components/pcf85063/pcf85063.cpp index 7abb243..102f329 100644 --- a/esphome/components/pcf85063/pcf85063.cpp +++ b/esphome/components/pcf85063/pcf85063.cpp @@ -135,6 +135,13 @@ bool PCF85063Component::clear_timer_flag() { return true; } +bool PCF85063Component::stop_timer() { + PCF85063_READ_REG(0x11, 1); + this->pcf85063_.reg.timer_enable = false; + PCF85063_WRITE_REG(0x11, 1); + return true; +} + bool PCF85063Component::clear_alarm_flag() { PCF85063_READ_REG(0x01, 1); this->pcf85063_.reg.alarm_flag = 0; diff --git a/esphome/components/pcf85063/pcf85063.h b/esphome/components/pcf85063/pcf85063.h index 3643764..c5e3272 100644 --- a/esphome/components/pcf85063/pcf85063.h +++ b/esphome/components/pcf85063/pcf85063.h @@ -34,6 +34,7 @@ class PCF85063Component : public time::RealTimeClock, public i2c::I2CDevice { bool write_timer_interval(uint16_t interval); bool clear_timer_flag(); bool clear_alarm_flag(); + bool stop_timer(); bool write_clockout_frequency(uint8_t freq); void set_timer_interrupt_enable_(bool state); void set_timer_interrupt_mode_(PCF85063ATimerInterruptMode_t mode);