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

Text sensor schema generator similar to sensor (#3172)

This commit is contained in:
Jesse Hills
2022-02-08 17:23:45 +13:00
committed by GitHub
parent ad43d6a5bc
commit 69856286e8
25 changed files with 176 additions and 298 deletions

View File

@@ -11,11 +11,7 @@ CONFIG_SCHEMA = cv.Schema(
cv.GenerateID(): cv.declare_id(CustomTextSensorConstructor),
cv.Required(CONF_LAMBDA): cv.returning_lambda,
cv.Required(CONF_TEXT_SENSORS): cv.ensure_list(
text_sensor.TEXT_SENSOR_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(text_sensor.TextSensor),
}
)
text_sensor.text_sensor_schema()
),
}
)