1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 21:32:21 +01:00

Use platform consts (#5508)

This commit is contained in:
Jesse Hills
2023-10-10 10:54:15 +13:00
committed by GitHub
parent be7e167c63
commit 46be886ca6
14 changed files with 74 additions and 34 deletions

View File

@@ -12,6 +12,9 @@ from esphome.const import (
CONF_SDA,
CONF_ADDRESS,
CONF_I2C_ID,
PLATFORM_ESP32,
PLATFORM_ESP8266,
PLATFORM_RP2040,
)
from esphome.core import coroutine_with_priority, CORE
@@ -60,7 +63,7 @@ CONFIG_SCHEMA = cv.All(
cv.Optional(CONF_SCAN, default=True): cv.boolean,
}
).extend(cv.COMPONENT_SCHEMA),
cv.only_on(["esp32", "esp8266", "rp2040"]),
cv.only_on([PLATFORM_ESP32, PLATFORM_ESP8266, PLATFORM_RP2040]),
)