From fdd33c49ac1e234d4c2adc6fcb4333819ed7b1c2 Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Wed, 19 Feb 2025 23:08:49 +0100 Subject: [PATCH] fix: correct memory address calculation in remove_lamp function of DynamicLampComponent --- esphome/components/dynamic_lamp/dynamic_lamp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/dynamic_lamp/dynamic_lamp.cpp b/esphome/components/dynamic_lamp/dynamic_lamp.cpp index 3a99360f17..9a9dc6c83d 100644 --- a/esphome/components/dynamic_lamp/dynamic_lamp.cpp +++ b/esphome/components/dynamic_lamp/dynamic_lamp.cpp @@ -163,7 +163,8 @@ void DynamicLampComponent::remove_lamp(std::string lamp_name) { } } for (uint8_t j = 0; j < 24; j++) { - this->fram_->write((0x0000 + (i * 24) + j), { 0xff }, 1); + uint16_t memaddress = (0x0000 + (i * 24) + j); + this->fram_->write(memaddress, &{ 0xff }, 1); } this->active_lamps_[i].active = false; this->lamp_count_--;