mirror of
https://github.com/esphome/esphome.git
synced 2025-09-26 23:22:21 +01:00
Use platform consts (#5508)
This commit is contained in:
@@ -12,6 +12,8 @@ from esphome.const import (
|
||||
ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
KEY_CORE,
|
||||
KEY_FRAMEWORK_VERSION,
|
||||
PLATFORM_ESP32,
|
||||
PLATFORM_RP2040,
|
||||
)
|
||||
from esphome.core import CORE
|
||||
|
||||
@@ -49,7 +51,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
).extend(cv.polling_component_schema("60s")),
|
||||
cv.only_on(["esp32", "rp2040"]),
|
||||
cv.only_on([PLATFORM_ESP32, PLATFORM_RP2040]),
|
||||
validate_config,
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user