geoffdavis / esphome-mitsubishiheatpump

ESPHome Climate Component for Mitsubishi Heatpumps using direct serial connection
BSD 2-Clause "Simplified" License
560 stars 153 forks source link

Mark component as failed if serial conflict is detected #143

Closed stewartadam closed 3 months ago

stewartadam commented 6 months ago

This PR moves serial-related validations into a single method so that we can more reliably detect failure conditions related to the serial communication, and mark the component as failed early if so.

This prevents crashes when accessing get_hw_serial_() and lights up the web component even if UART0 is in conflict.