mirror of
https://github.com/geoffdavis/esphome-mitsubishiheatpump
synced 2024-08-30 18:12:13 +00:00
Fix KeyError in ESPHome 2024.6.X
This commit is contained in:
parent
980271337a
commit
31ed3068fc
@ -10,6 +10,7 @@ from esphome.const import (
|
||||
CONF_MODE,
|
||||
CONF_FAN_MODE,
|
||||
CONF_SWING_MODE,
|
||||
PLATFORM_ESP8266
|
||||
)
|
||||
from esphome.core import CORE, coroutine
|
||||
|
||||
@ -63,7 +64,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:
|
||||
|
Loading…
Reference in New Issue
Block a user