Add select

This commit is contained in:
T
2025-03-14 17:57:43 +01:00
parent 419143d70a
commit 6454dc6d58
6 changed files with 61 additions and 11 deletions

View File

@@ -6,6 +6,8 @@ from . import CONF_OPTOMA_RS232_ID, OptomaRS232Component, optoma_ns
DEPENDENCIES = ["optoma_rs232"]
InputSelect = optoma_ns.class_("InputSelect", select.Select)
Inputs = optoma_ns.enum("Inputs")
INPUT_OPTIONS = {
"Unknown": 0,
@@ -14,8 +16,7 @@ INPUT_OPTIONS = {
"HDMI 2": 8,
}
CONFIG_SCHEMA = select.select_schema(
).extend({
CONFIG_SCHEMA = select.select_schema(InputSelect).extend({
cv.GenerateID(CONF_OPTOMA_RS232_ID): cv.use_id(OptomaRS232Component),
})