mirror of
https://github.com/geoffdavis/esphome-mitsubishiheatpump
synced 2024-08-30 18:12:13 +00:00
Merge pull request #153 from ghisch/patch-1
Fix KeyError in ESPHome 2024.6.X
This commit is contained in:
commit
c97f6a097c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user