Let show_*_page actions depend on "Display" (#6092)

Instead of forcing a DisplayBuffer, let the display page actions use Displays without buffer.
This commit is contained in:
guillempages 2024-01-13 22:01:32 +01:00 committed by Jesse Hills
parent 7dced7f55d
commit bd7fe1227c
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -145,7 +145,7 @@ async def display_page_show_to_code(config, action_id, template_arg, args):
DisplayPageShowNextAction, DisplayPageShowNextAction,
maybe_simple_id( maybe_simple_id(
{ {
cv.Required(CONF_ID): cv.templatable(cv.use_id(DisplayBuffer)), cv.Required(CONF_ID): cv.templatable(cv.use_id(Display)),
} }
), ),
) )
@ -159,7 +159,7 @@ async def display_page_show_next_to_code(config, action_id, template_arg, args):
DisplayPageShowPrevAction, DisplayPageShowPrevAction,
maybe_simple_id( maybe_simple_id(
{ {
cv.Required(CONF_ID): cv.templatable(cv.use_id(DisplayBuffer)), cv.Required(CONF_ID): cv.templatable(cv.use_id(Display)),
} }
), ),
) )
@ -173,7 +173,7 @@ async def display_page_show_previous_to_code(config, action_id, template_arg, ar
DisplayIsDisplayingPageCondition, DisplayIsDisplayingPageCondition,
cv.maybe_simple_value( cv.maybe_simple_value(
{ {
cv.GenerateID(CONF_ID): cv.use_id(DisplayBuffer), cv.GenerateID(CONF_ID): cv.use_id(Display),
cv.Required(CONF_PAGE_ID): cv.use_id(DisplayPage), cv.Required(CONF_PAGE_ID): cv.use_id(DisplayPage),
}, },
key=CONF_PAGE_ID, key=CONF_PAGE_ID,