mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
Use ENTITY_CATEGORY_CONFIG for sprinkler config switches. (#4141)
Update esphome/components/sprinkler/__init__.py Co-Authored-By: Keith Burzinski <kbx81x@gmail.com> Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
parent
dbbbba3cf8
commit
48da5ef1c4
1 changed files with 13 additions and 4 deletions
|
@ -8,6 +8,7 @@ from esphome.const import (
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
CONF_REPEAT,
|
CONF_REPEAT,
|
||||||
CONF_RUN_DURATION,
|
CONF_RUN_DURATION,
|
||||||
|
ENTITY_CATEGORY_CONFIG,
|
||||||
)
|
)
|
||||||
|
|
||||||
AUTO_LOAD = ["switch"]
|
AUTO_LOAD = ["switch"]
|
||||||
|
@ -223,7 +224,9 @@ SPRINKLER_ACTION_QUEUE_VALVE_SCHEMA = cv.Schema(
|
||||||
SPRINKLER_VALVE_SCHEMA = cv.Schema(
|
SPRINKLER_VALVE_SCHEMA = cv.Schema(
|
||||||
{
|
{
|
||||||
cv.Optional(CONF_ENABLE_SWITCH): cv.maybe_simple_value(
|
cv.Optional(CONF_ENABLE_SWITCH): cv.maybe_simple_value(
|
||||||
switch.switch_schema(SprinklerControllerSwitch),
|
switch.switch_schema(
|
||||||
|
SprinklerControllerSwitch, entity_category=ENTITY_CATEGORY_CONFIG
|
||||||
|
),
|
||||||
key=CONF_NAME,
|
key=CONF_NAME,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_PUMP_OFF_SWITCH_ID): cv.use_id(switch.Switch),
|
cv.Optional(CONF_PUMP_OFF_SWITCH_ID): cv.use_id(switch.Switch),
|
||||||
|
@ -244,7 +247,9 @@ SPRINKLER_CONTROLLER_SCHEMA = cv.Schema(
|
||||||
{
|
{
|
||||||
cv.GenerateID(): cv.declare_id(Sprinkler),
|
cv.GenerateID(): cv.declare_id(Sprinkler),
|
||||||
cv.Optional(CONF_AUTO_ADVANCE_SWITCH): cv.maybe_simple_value(
|
cv.Optional(CONF_AUTO_ADVANCE_SWITCH): cv.maybe_simple_value(
|
||||||
switch.switch_schema(SprinklerControllerSwitch),
|
switch.switch_schema(
|
||||||
|
SprinklerControllerSwitch, entity_category=ENTITY_CATEGORY_CONFIG
|
||||||
|
),
|
||||||
key=CONF_NAME,
|
key=CONF_NAME,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_MAIN_SWITCH): cv.maybe_simple_value(
|
cv.Optional(CONF_MAIN_SWITCH): cv.maybe_simple_value(
|
||||||
|
@ -252,11 +257,15 @@ SPRINKLER_CONTROLLER_SCHEMA = cv.Schema(
|
||||||
key=CONF_NAME,
|
key=CONF_NAME,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_QUEUE_ENABLE_SWITCH): cv.maybe_simple_value(
|
cv.Optional(CONF_QUEUE_ENABLE_SWITCH): cv.maybe_simple_value(
|
||||||
switch.switch_schema(SprinklerControllerSwitch),
|
switch.switch_schema(
|
||||||
|
SprinklerControllerSwitch, entity_category=ENTITY_CATEGORY_CONFIG
|
||||||
|
),
|
||||||
key=CONF_NAME,
|
key=CONF_NAME,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_REVERSE_SWITCH): cv.maybe_simple_value(
|
cv.Optional(CONF_REVERSE_SWITCH): cv.maybe_simple_value(
|
||||||
switch.switch_schema(SprinklerControllerSwitch),
|
switch.switch_schema(
|
||||||
|
SprinklerControllerSwitch, entity_category=ENTITY_CATEGORY_CONFIG
|
||||||
|
),
|
||||||
key=CONF_NAME,
|
key=CONF_NAME,
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_MANUAL_SELECTION_DELAY): cv.positive_time_period_seconds,
|
cv.Optional(CONF_MANUAL_SELECTION_DELAY): cv.positive_time_period_seconds,
|
||||||
|
|
Loading…
Reference in a new issue