ESPHome 2024.6.1 Compile Error
It looks like converting the hardware UART to serial changed, and the heatpump component needs a fix: https://github.com/geoffdavis/esphome-mitsubishiheatpump/issues/152
Compile error message
INFO ESPHome 2024.6.1
INFO Reading configuration /config/esphome/bedroom-mini-split.yaml...
WARNING GPIO2 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 8, in <module>
sys.exit(main())
^^^^^^
File "/esphome/esphome/__main__.py", line 1079, in main
return run_esphome(sys.argv)
^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 1066, in run_esphome
rc = POST_CONFIG_ACTIONS[args.command](args, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 484, in command_run
exit_code = write_cpp(config)
^^^^^^^^^^^^^^^^^
File "/esphome/esphome/__main__.py", line 193, in write_cpp
generate_cpp_contents(config)
File "/esphome/esphome/__main__.py", line 205, in generate_cpp_contents
CORE.flush_tasks()
File "/esphome/esphome/core/__init__.py", line 681, in flush_tasks
self.event_loop.flush_tasks()
File "/esphome/esphome/coroutine.py", line 246, in flush_tasks
next(task.iterator)
File "/esphome/esphome/__main__.py", line 185, in wrapped
await coro(conf)
File "/esphome/esphome/coroutine.py", line 80, in coro
ret = yield from _flatten_generator(gen)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/esphome/esphome/coroutine.py", line 118, in _flatten_generator
val = gen.send(to_send)
^^^^^^^^^^^^^^^^^
File "/data/external_components/d980f6ff/components/mitsubishi_heatpump/climate.py", line 66, in to_code
serial = HARDWARE_UART_TO_SERIAL[config[CONF_HARDWARE_UART]]
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'UART2'