From 1da964f4bc080c8f5efea85ad67c69f0b1972a72 Mon Sep 17 00:00:00 2001 From: phoenixswiss <52887628+phoenixswiss@users.noreply.github.com> Date: Mon, 25 Dec 2023 17:06:54 +0100 Subject: [PATCH] Fix Waveshare 7.50in-bV3 epaper screens are always powered on --- .../components/waveshare_epaper/waveshare_epaper.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/esphome/components/waveshare_epaper/waveshare_epaper.h b/esphome/components/waveshare_epaper/waveshare_epaper.h index ee9443e8be2f..f06445b730d5 100644 --- a/esphome/components/waveshare_epaper/waveshare_epaper.h +++ b/esphome/components/waveshare_epaper/waveshare_epaper.h @@ -470,19 +470,23 @@ class WaveshareEPaper7P5InBV3 : public WaveshareEPaper { void dump_config() override; void deep_sleep() override { - this->command(0x02); // Power off + // COMMAND POWER OFF + this->command(0x02); this->wait_until_idle_(); - this->command(0x07); // Deep sleep - this->data(0xA5); + // COMMAND DEEP SLEEP + this->command(0x07); + this->data(0xA5); // check byte } - void clear_screen(); + protected: int get_width_internal() override; int get_height_internal() override; + uint32_t idle_timeout_() override; + void reset_() { if (this->reset_pin_ != nullptr) { this->reset_pin_->digital_write(true); @@ -494,7 +498,7 @@ class WaveshareEPaper7P5InBV3 : public WaveshareEPaper { } }; - void init_display_(); + }; class WaveshareEPaper7P5InBC : public WaveshareEPaper {