diff --git a/esphome/components/remote_base/rc_switch_protocol.h b/esphome/components/remote_base/rc_switch_protocol.h index 46d624f4ba..cf39f0eae7 100644 --- a/esphome/components/remote_base/rc_switch_protocol.h +++ b/esphome/components/remote_base/rc_switch_protocol.h @@ -65,11 +65,11 @@ class RCSwitchBase { uint32_t zero_low_{}; uint32_t one_high_{}; uint32_t one_low_{}; - bool inverted_{}; + uint32_t inverted_{}; // bool widened so every field is a word: the table is read from flash }; -// Constant-initialized: no global constructor, and in flash on platforms that map .rodata there -inline constexpr RCSwitchBase RC_SWITCH_PROTOCOLS[] = { +// Constant-initialized and kept in flash on every platform; all fields are 32-bit so ESP8266 can read it in place +inline constexpr RCSwitchBase RC_SWITCH_PROTOCOLS[] PROGMEM = { {0, 0, 0, 0, 0, 0, false}, {350, 10850, 350, 1050, 1050, 350, false}, {650, 6500, 650, 1300, 1300, 650, false},