Set min_version to ESPHome 2025.8.0

This commit is contained in:
Edward Firmo
2025-08-08 07:37:52 +02:00
parent d905b69ad2
commit 1df58e162f
4 changed files with 35 additions and 17 deletions

View File

@@ -74,8 +74,9 @@ namespace esphome {
if (this->gang_count_ == 1)
return 1;
// Calculate button number Change to round up instead of truncate (integer division)
const uint8_t width = (TOUCH_MAX_POSITION + gang_count_) / this->gang_count_; // Width of each button region
// Calculate button width (rounds up to ensure full coverage)
const uint8_t width =
(TOUCH_MAX_POSITION + this->gang_count_) / this->gang_count_; // Width of each button region
if (width < 1) // Invalid width - and prevents division by zero
return 0;
const uint8_t button = std::min(