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

[update] Set entity_category to config & Publish state to logs (#6954)

This commit is contained in:
Jesse Hills
2024-06-21 14:59:52 +12:00
committed by GitHub
parent 8045b889d3
commit e7556271e7
2 changed files with 31 additions and 0 deletions

View File

@@ -4,11 +4,13 @@ import esphome.config_validation as cv
import esphome.codegen as cg
from esphome.const import (
CONF_DEVICE_CLASS,
CONF_ENTITY_CATEGORY,
CONF_ID,
CONF_MQTT_ID,
CONF_WEB_SERVER_ID,
DEVICE_CLASS_EMPTY,
DEVICE_CLASS_FIRMWARE,
ENTITY_CATEGORY_CONFIG,
)
from esphome.core import CORE, coroutine_with_priority
from esphome.cpp_helpers import setup_entity
@@ -41,6 +43,9 @@ UPDATE_SCHEMA = (
cv.Optional(CONF_ON_UPDATE_AVAILABLE): automation.validate_automation(
single=True
),
cv.Optional(
CONF_ENTITY_CATEGORY, default=ENTITY_CATEGORY_CONFIG
): cv.entity_category,
}
)
)