One more template and then bootloop!

Hi

I’m using Kincony K868-AG for IR commands on STB and so I store also into it favorites. Unhappy it looks like ESPHome has quantity limitations for switch templates. It compiles fine but once loaded in ESP it’s bootloop :frowning:
Any workaround ? or really an issue in ESPHome ? I opened a bug ticket https://github.com/esphome/issues/issues/3436

Original code working fine:

substitutions:
  friendly_name: esp-tr-05
  source_name: iptv_mrs

esphome:
  name: $friendly_name

esp32:
  board: esp32dev
  framework:
    type: arduino

logger:

web_server:

ota:

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_passwd
  manual_ip:
    static_ip: 172.16.2.84
    gateway: 172.16.1.1
    subnet: 255.255.252.0
  ap:
    ssid: $friendly_name

captive_portal:

api:
  
sensor:
  - platform: wifi_signal
    name: $friendly_name WiFi Signal
    update_interval: 60s
  - platform: uptime
    name: $friendly_name Uptime
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes

#remote_receiver:
#  id: ir_receiver
#  pin:
#    number: GPIO23
#    inverted: True
#  idle: 25ms
#  dump: all
#  tolerance: 50%

remote_transmitter:
  pin: GPIO2
  carrier_duty_percent: 50%

switch:
  - platform: template
    name: $source_name Al Arabya
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Al Ekhabarya
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Al Hayat
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Al Jazeera (Arabic)
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Al Jazeera (English)
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d0
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Al Jazeera Mubasher
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Animal Planet
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Bahrain TV
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name BBC (Arabic)
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: ok
#  - platform: template
#    name: $source_name BBC Four
#    turn_on_action:
#    - switch.turn_on: d1
#    - delay: 0.1s
#    - switch.turn_on: d8
#    - delay: 0.1s
#    - switch.turn_on: d9
#    - delay: 0.1s
#    - switch.turn_on: ok
  - platform: template
    name: $source_name BBC News
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name BBC One
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name BBC Two
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Bloomberg
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Channel 4
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Channel 5
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d9
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name CNBC
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name CNN
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d0
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Comedy Central
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Discovery
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d9
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Discovery Science
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Dream
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name E4 & More
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Eden
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Euronews
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Eurosport
    turn_on_action:
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d9
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Film 4
    turn_on_action:
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Food Network
    turn_on_action:
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name France 24 (Arabic)
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name France 24 (English)
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Future TV
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Great Movies
    turn_on_action:
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name History
    turn_on_action:
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d0
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d0
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name ITV3
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name ITV 4
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name LBC Lebanon
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name LDC
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name MBC 1
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name MBC 2
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d9
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name MBC Drama
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name MBC Masr 2
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Movies 24
    turn_on_action:
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name MTV
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name MTV Lebanon
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name National Geographic
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name NBN Lebanon
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name NHK World
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Nile Cinema
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Nile Comedy
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Nile Drama
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d9
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Nile Family
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d0
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Now 80's
    turn_on_action:
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Now 90's
    turn_on_action:
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name OTV
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d0
    - delay: 0.1s
    - switch.turn_on: d9
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Rotana Cinema
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Rotana Aflam Classic
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d6
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Rotana Clip
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Rotana Khaliji
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Rotana Music
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d0
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Saudi 1
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Sky Arts
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Sky Atlantic
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Sky Cine Greats
    turn_on_action:
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Sky Cine Hits
    turn_on_action:
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d9
    - delay: 0.1s
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Sky News
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Sky News Arabia
    turn_on_action:
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d3
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Smithsonian
    turn_on_action:
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: d8
    - delay: 0.1s
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name TCM
    turn_on_action:
    - switch.turn_on: d2
    - delay: 0.1s
    - switch.turn_on: d7
    - delay: 0.1s
    - switch.turn_on: d5
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Yesterday
    turn_on_action:
    - switch.turn_on: d1
    - delay: 0.1s
    - switch.turn_on: d4
    - delay: 0.1s
    - switch.turn_on: d9
    - delay: 0.1s
    - switch.turn_on: ok
  - platform: template
    name: $source_name Power
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0041 0020 0021 0040 0021 0020 06C3"
  - platform: template
    name: $source_name TV Power
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0041 0040 0041 0020 0021 0040 0041 0020 06C3"
  - platform: template
    name: $source_name A/V
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0020 0021 0040 06C3"
  - platform: template
    name: $source_name Red
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0041 0020 0021 0040 0021 0020 0041 0040 06C3"
  - platform: template
    name: $source_name Green
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0041 0020 0020 0041 0020 0021 0020 0021 0040 0041 0020 0021 0040 0021 0020 0021 0020 0041 0020 06C3"
  - platform: template
    name: $source_name Yellow
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0041 0020 06C3"
  - platform: template
    name: $source_name Blue
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0041 0040 06C3"
  - platform: template
    name: $source_name Mute
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0021 0020 0020 0021 0040 0041 0021 0020 0020 0021 0040 0041 0020 0021 0040 0021 0020 0021 0020 0021 0020 06C3"
  - platform: template
    name: $source_name TV
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0041 0020 0021 0040 0041 0040 0041 0020 06C3"
  - platform: template
    name: $source_name EPG
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0041 0020 0021 0040 0041 0020 0021 0040 06C3"
  - platform: template
    name: $source_name Settings
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0041 0020 0021 0040 0021 0020 0041 0020 0021 0020 06C3"
  - platform: template
    name: $source_name i
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0041 0020 06C3"
  - platform: template
    name: $source_name Vol +
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0041 0040 0021 0020 0041 0040 06C3"
  - platform: template
    name: $source_name Vol -
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0041 0041 0020 0020 0041 0021 0020 0020 06C3"
  - platform: template
    name: $source_name CH +
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0020 0021 0040 0021 0020 06C3"
  - platform: template
    name: $source_name CH -
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0020 0041 0020 06C3"
  - platform: template
    name: $source_name Up
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0020 0021 0040 0041 0020 06C3"
  - platform: template
    name: $source_name Down
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0021 0020 0020 0021 0040 0041 0020 0021 0020 0021 0020 0021 0021 0020 0040 06C3"
  - platform: template
    name: $source_name Left
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000C 0000 0021 0020 0021 0020 0040 0041 0020 0021 0020 0021 0040 0041 0021 0020 0020 0021 0021 0020 0020 0021 0020 0021 0020 06C3"
  - platform: template
    name: $source_name Right
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0041 0040 0041 0040 0041 0020 0021 0020 06C3"
  - platform: template
    name: $source_name OK
    id: "ok"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0041 0040 0041 0020 0021 0040 0021 0020 06C3"
  - platform: template
    name: $source_name Home
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0041 0020 0021 0040 0041 0020 06C3"
  - platform: template
    name: $source_name Return
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000C 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0041 0020 0021 0020 0021 0020 0021 0020 06C3"
  - platform: template
    name: $source_name APP
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 06C3"
  - platform: template
    name: $source_name PIP
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0041 0040 0041 0020 0021 0020 0021 0040 06C3"
  - platform: template
    name: $source_name Menu
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0041 0040 0041 0041 06C3"
  - platform: template
    name: $source_name Rewind
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000A 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0041 0040 0041 0020 0021 0040 06C3"
  - platform: template
    name: $source_name Play/Pause
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0041 0040 0041 0020 0021 0020 06C3"
  - platform: template
    name: $source_name Forward
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0041 0040 0021 0020 0021 0021 0020 0020 06C3"
  - platform: template
    name: $source_name 1
    id: "d1"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000C 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0041 0020 06C3"
  - platform: template
    name: $source_name 2
    id: "d2"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0021 0020 0020 0021 0040 0021 0020 0021 0020 0021 0020 0021 0020 0041 0040 06C3"
  - platform: template
    name: $source_name 3
    id: "d3"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000C 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0021 0020 0021 0020 0041 0020 0021 0020 06C3"
  - platform: template
    name: $source_name 4
    id: "d4"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0021 0020 0041 0040 0021 0020 06C3"
  - platform: template
    name: $source_name 5
    id: "d5"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0021 0020 0041 0040 0041 0020 06C3"
  - platform: template
    name: $source_name 6
    id: "d6"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0041 0020 0020 0021 0020 0021 0020 0041 0020 0021 0040 06C3"
  - platform: template
    name: $source_name 7
    id: "d7"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000C 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0021 0020 0021 0040 0021 0020 0021 0020 0020 06C3"
  - platform: template
    name: $source_name 8
    id: "d8"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0041 0040 0021 0020 0021 0020 06C3"
  - platform: template
    name: $source_name 9
    id: "d9"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0041 0040 0021 0020 0041 0020 06C3"
  - platform: template
    name: $source_name 0
    id: "d0"
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000C 0000 0020 0021 0040 0021 0020 0041 0020 0021 0020 0021 0040 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 0021 0020 06C3"
  - platform: template
    name: $source_name Resize
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0020 0021 0040 0041 0020 0021 0020 0021 0040 0021 0020 0041 0040 0041 0020 0021 0020 0021 0020 06C3"
  - platform: template
    name: $source_name Keyboard
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 000B 0000 0020 0021 0040 0021 0020 0041 0021 0020 0020 0021 0040 0021 0020 0041 0020 0021 0040 0021 0020 0021 0020 06C3"

If I uncomment the BBC Four template then ESP goes in bootloop :frowning:

Vnicèn

Boot loop logs (separate message due to forum restrictions)

[11:06:33][I][logger:243]: Log initialized
[11:06:33][C][ota:461]: There have been 8 suspected unsuccessful boot attempts.
[11:06:33][D][esp32.preferences:114]: Saving preferences to flash...
[11:06:34][I][app:029]: Running through setup()...
[11:06:34][C][wifi:037]: Setting up WiFi...
[11:06:34][D][wifi:373]: Starting scan...
[11:06:34]Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception)
[11:06:34]Debug exception reason: Stack canary watchpoint triggered (loopTask) 
[11:06:34]Core 1 register dump:
[11:06:34]PC      : 0x4008e129  PS      : 0x00060e36  A0      : 0x8008e1fa  A1      : 0x3ffb0060  
WARNING Decoded 0x4008e129: poison_allocated_region at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
[11:06:34]A2      : 0x3ffe0938  A3      : 0xbaad5678  A4      : 0x3ffe092c  A5      : 0x3f741205  
[11:06:34]A6      : 0x3ffb01a0  A7      : 0x3ffb01a4  A8      : 0x3ffe09bc  A9      : 0x3ffe0930  
[11:06:34]A10     : 0x00000001  A11     : 0x3ffe092c  A12     : 0x00003590  A13     : 0x0000003c  
[11:06:34]A14     : 0x3ffe3f18  A15     : 0x3ffe09c0  SAR     : 0x00000004  EXCCAUSE: 0x00000001  
[11:06:34]EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffb  
[11:06:34]
[11:06:34]ELF file SHA256: 0000000000000000
[11:06:34]
[11:06:34]Backtrace: 0x4008e129:0x3ffb0060 0x4008e1f7:0x3ffb0090 0x40081d51:0x3ffb00b0 0x40081d82:0x3ffb00d0 0x40086e5d:0x3ffb00f0 0x4000beaf:0x3ffb0110 0x40086e9b:0x3ffb0130 0x4012036b:0x3ffb0150 0x401209c1:0x3ffb0170 0x4011f7c9:0x3ffb01a0 0x4011a9fd:0x3ffb0230 0x4011f4ae:0x3ffb0540 0x4011f4ea:0x3ffb05d0 0x400d8881:0x3ffb0610 0x400d8aba:0x3ffb0640 0x400e298d:0x3ffb0660 0x400e29ba:0x3ffb0690 0x400daef9:0x3ffb06f0 0x400dab62:0x3ffb0750 0x400dab8e:0x3ffb0770 0x400daf84:0x3ffb07a0 0x400dbaef:0x3ffb07d0 0x400dbafc:0x3ffb0800 0x40179d45:0x3ffb0820 0x400e319a:0x3ffb0840 0x400e1c8f:0x3ffb0890 0x400f2216:0x3ffb08e0 0x400fdcae:0x3ffb1fb0 0x4008aa6e:0x3ffb1fd0
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x4008e129: poison_allocated_region at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
WARNING Decoded 0x4008e1f7: multi_heap_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
WARNING Decoded 0x40081d51: heap_caps_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:354
WARNING Decoded 0x40081d82: heap_caps_malloc_default at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:354
WARNING Decoded 0x40086e5d: _malloc_r at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:37
WARNING Decoded 0x40086e9b: _calloc_r at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:58
WARNING Decoded 0x4012036b: _Balloc at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/mprec.c:106
WARNING Decoded 0x401209c1: __d2b at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/mprec.c:785
WARNING Decoded 0x4011f7c9: _dtoa_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/dtoa.c:291
WARNING Decoded 0x4011a9fd: cvt at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:1878
 (inlined by) _svfprintf_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:1317
WARNING Decoded 0x4011f4ae: _vsnprintf_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vsnprintf.c:72
WARNING Decoded 0x4011f4ea: vsnprintf at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vsnprintf.c:41
WARNING Decoded 0x400d8881: esphome::logger::Logger::vprintf_to_buffer_(char const*, __va_list_tag) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/logger/logger.cpp:248
WARNING Decoded 0x400d8aba: esphome::logger::Logger::log_vprintf_(int, char const*, int, char const*, __va_list_tag) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/logger/logger.cpp:248
WARNING Decoded 0x400e298d: esphome::esp_log_vprintf_(int, char const*, int, char const*, __va_list_tag) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/log.cpp:32
WARNING Decoded 0x400e29ba: esphome::esp_log_printf_(int, char const*, int, char const*, ...) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/log.cpp:14
WARNING Decoded 0x400daef9: esphome::sensor::Sensor::internal_send_state_to_frontend(float) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/sensor/sensor.cpp:118
WARNING Decoded 0x400dab62: esphome::sensor::Filter::output(float) at /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/basic_string.tcc:216
WARNING Decoded 0x400dab8e: esphome::sensor::Filter::input(float) at /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/basic_string.tcc:216
WARNING Decoded 0x400daf84: esphome::sensor::Sensor::publish_state(float) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/sensor/sensor.cpp:118
WARNING Decoded 0x400dbaef: esphome::uptime::UptimeSensor::update() at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/uptime/uptime_sensor.cpp:27
WARNING Decoded 0x400dbafc: non-virtual thunk to esphome::uptime::UptimeSensor::update()
WARNING Decoded 0x40179d45: std::_Function_handler<void (), esphome::PollingComponent::call_setup()::{lambda()#1}>::_M_invoke(std::_Any_data const&) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/component.cpp:149
 (inlined by) _M_invoke at /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1871
WARNING Decoded 0x400e319a: std::function<void ()>::operator()() const at /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1710
 (inlined by) esphome::Scheduler::call() at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/scheduler.cpp:204
WARNING Decoded 0x400e1c8f: esphome::Application::setup() at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/application.cpp:49
WARNING Decoded 0x400f2216: setup() at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/gpio.h:62
WARNING Decoded 0x400fdcae: loopTask(void*) at /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:18
WARNING Decoded 0x4008aa6e: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)
[11:06:35]
[11:06:35]Rebooting...
[11:06:35]ets Jun  8 2016 00:22:57
[11:06:35]
[11:06:35]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[11:06:35]configsip: 0, SPIWP:0xee
[11:06:35]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[11:06:35]mode:DIO, clock div:2
[11:06:35]load:0x3fff0018,len:4
[11:06:35]load:0x3fff001c,len:1044
[11:06:35]load:0x40078000,len:10124
[11:06:35]load:0x40080400,len:5828
[11:06:35]entry 0x400806a8
[11:06:35][I][logger:243]: Log initialized
[11:06:35][C][ota:461]: There have been 9 suspected unsuccessful boot attempts.
[11:06:35][D][esp32.preferences:114]: Saving preferences to flash...
[11:06:35][I][app:029]: Running through setup()...
[11:06:35][C][wifi:037]: Setting up WiFi...
[11:06:35][D][wifi:373]: Starting scan...
[11:06:35]Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception)
[11:06:35]Debug exception reason: Stack canary watchpoint triggered (loopTask) 
[11:06:35]Core 1 register dump:
[11:06:35]PC      : 0x4008e129  PS      : 0x00060e36  A0      : 0x8008e1fa  A1      : 0x3ffb0060  
WARNING Decoded 0x4008e129: poison_allocated_region at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
[11:06:35]A2      : 0x3ffe1000  A3      : 0xbaad5678  A4      : 0x3ffe0ff4  A5      : 0x3f7050d3  
[11:06:35]A6      : 0x3ffb01a0  A7      : 0x3ffb01a4  A8      : 0x3ffe1084  A9      : 0x3ffe0ff8  
[11:06:35]A10     : 0x00000001  A11     : 0x3ffe0ff4  A12     : 0x00002e8c  A13     : 0x00000000  
[11:06:35]A14     : 0x3ffe3f18  A15     : 0x3ffe1088  SAR     : 0x00000004  EXCCAUSE: 0x00000001  
[11:06:35]EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffb  
[11:06:35]
[11:06:35]ELF file SHA256: 0000000000000000
[11:06:35]
[11:06:35]Backtrace: 0x4008e129:0x3ffb0060 0x4008e1f7:0x3ffb0090 0x40081d51:0x3ffb00b0 0x40081d82:0x3ffb00d0 0x40086e5d:0x3ffb00f0 0x4000beaf:0x3ffb0110 0x40086e9b:0x3ffb0130 0x4012036b:0x3ffb0150 0x401209c1:0x3ffb0170 0x4011f7c9:0x3ffb01a0 0x4011a9fd:0x3ffb0230 0x4011f4ae:0x3ffb0540 0x4011f4ea:0x3ffb05d0 0x400d8881:0x3ffb0610 0x400d8aba:0x3ffb0640 0x400e298d:0x3ffb0660 0x400e29ba:0x3ffb0690 0x400daef9:0x3ffb06f0 0x400dab62:0x3ffb0750 0x400dab8e:0x3ffb0770 0x400daf84:0x3ffb07a0 0x400dbaef:0x3ffb07d0 0x400dbafc:0x3ffb0800 0x40179d45:0x3ffb0820 0x400e319a:0x3ffb0840 0x400e1c8f:0x3ffb0890 0x400f2216:0x3ffb08e0 0x400fdcae:0x3ffb1fb0 0x4008aa6e:0x3ffb1fd0
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x4008e129: poison_allocated_region at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
WARNING Decoded 0x4008e1f7: multi_heap_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
WARNING Decoded 0x40081d51: heap_caps_malloc at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:354
WARNING Decoded 0x40081d82: heap_caps_malloc_default at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:354
WARNING Decoded 0x40086e5d: _malloc_r at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:37
WARNING Decoded 0x40086e9b: _calloc_r at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:58
WARNING Decoded 0x4012036b: _Balloc at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/mprec.c:106
WARNING Decoded 0x401209c1: __d2b at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/mprec.c:785
WARNING Decoded 0x4011f7c9: _dtoa_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/dtoa.c:291
WARNING Decoded 0x4011a9fd: cvt at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:1878
 (inlined by) _svfprintf_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:1317
WARNING Decoded 0x4011f4ae: _vsnprintf_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vsnprintf.c:72
WARNING Decoded 0x4011f4ea: vsnprintf at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vsnprintf.c:41
WARNING Decoded 0x400d8881: esphome::logger::Logger::vprintf_to_buffer_(char const*, __va_list_tag) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/logger/logger.cpp:248
WARNING Decoded 0x400d8aba: esphome::logger::Logger::log_vprintf_(int, char const*, int, char const*, __va_list_tag) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/logger/logger.cpp:248
WARNING Decoded 0x400e298d: esphome::esp_log_vprintf_(int, char const*, int, char const*, __va_list_tag) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/log.cpp:32
WARNING Decoded 0x400e29ba: esphome::esp_log_printf_(int, char const*, int, char const*, ...) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/log.cpp:14
WARNING Decoded 0x400daef9: esphome::sensor::Sensor::internal_send_state_to_frontend(float) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/sensor/sensor.cpp:118
WARNING Decoded 0x400dab62: esphome::sensor::Filter::output(float) at /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/basic_string.tcc:216
WARNING Decoded 0x400dab8e: esphome::sensor::Filter::input(float) at /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/bits/basic_string.tcc:216
WARNING Decoded 0x400daf84: esphome::sensor::Sensor::publish_state(float) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/sensor/sensor.cpp:118
WARNING Decoded 0x400dbaef: esphome::uptime::UptimeSensor::update() at /config/esphome/.esphome/build/esp-tr-05/src/esphome/components/uptime/uptime_sensor.cpp:27
WARNING Decoded 0x400dbafc: non-virtual thunk to esphome::uptime::UptimeSensor::update()
WARNING Decoded 0x40179d45: std::_Function_handler<void (), esphome::PollingComponent::call_setup()::{lambda()#1}>::_M_invoke(std::_Any_data const&) at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/component.cpp:149
 (inlined by) _M_invoke at /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1871
WARNING Decoded 0x400e319a: std::function<void ()>::operator()() const at /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/5.2.0/functional:1710
 (inlined by) esphome::Scheduler::call() at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/scheduler.cpp:204
WARNING Decoded 0x400e1c8f: esphome::Application::setup() at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/application.cpp:49
WARNING Decoded 0x400f2216: setup() at /config/esphome/.esphome/build/esp-tr-05/src/esphome/core/gpio.h:62
WARNING Decoded 0x400fdcae: loopTask(void*) at /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:18
WARNING Decoded 0x4008aa6e: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)
[11:06:37]
[11:06:37]Rebooting...

Ih I comment one of the IR command template then I can add back safely my extra channel preset ! It looks like the template has hard limit on number you can have but it doesn’t generate any error/warning when compiled :frowning:

That’s called RAM and it’s not infinite :wink:

For sure but are you sure it’s that ? as I would have expected then the compiler to refuse compilation no ?

When I see calloc/malloc issues, I’m pretty sure, yes.
We talk about RAM. RAM is allocated dynamically at execution time, it’s not a compilation-time thing.

Specifically, here, it seems a RAM allocation fails specifically when rendering a debug message.
For just a single or couple more template, it might actually run when not debugging, but you are extremely close to the limit anyway.

Thanks for all these details @koying and helps better understand the issue. ESP has 4Mb RAM.
I have “converted” code in button instead of using switches and problem has disappeared but I guess it might be due at difference of memory use for switch and button (button is a lot simpler than switches to implement I think :wink:
Will see if problem arises again once adding more TV presets. Thinking also perhaps to use something like SmartIR so I can keep all these in HA and get ESP just emitting codes sent by HA :slight_smile:

1 Like

No :warning:

It depends on the model but a generic esp82xx should have a maximum of 160KiB RAM (as wikipedia states), a (classic) ESP32 doubles that to 320KiB. Beside it’s also possible to have ESP32 with psram (like the esp32cam’s have).

I guess you confuse it with FLASH? A typically flash size of a esp82xx module (like on a d1 mini) can be 4 MiB :bulb:

Yep you are right, sorry for confusion :wink:

Yep for sure but what confuses me even more is infos displayed by ESPHome when I flash the device. It indicates around 40` of Flash so I guess it’s my code storage space in ESP but only 15% for RAM ??? How is he able to guess RAM used by code ? or I’m confusing everything ?