diff --git a/components/mitsubishi_heatpump/climate.py b/components/mitsubishi_heatpump/climate.py index 7c90ca3..9609eed 100644 --- a/components/mitsubishi_heatpump/climate.py +++ b/components/mitsubishi_heatpump/climate.py @@ -12,6 +12,7 @@ from esphome.const import ( CONF_MODE, CONF_FAN_MODE, CONF_SWING_MODE, + PLATFORM_ESP8266 ) from esphome.core import CORE, coroutine @@ -97,7 +98,7 @@ CONFIG_SCHEMA = climate.CLIMATE_SCHEMA.extend( @coroutine def to_code(config): - serial = HARDWARE_UART_TO_SERIAL[config[CONF_HARDWARE_UART]] + serial = HARDWARE_UART_TO_SERIAL[PLATFORM_ESP8266][config[CONF_HARDWARE_UART]] var = cg.new_Pvariable(config[CONF_ID], cg.RawExpression(f"&{serial}")) if CONF_BAUD_RATE in config: