5050 CONF_DISARM_ACTION ,
5151 CONF_TRIGGER_ACTION ,
5252 TemplateCodeFormat ,
53+ async_create_preview_alarm_control_panel ,
5354)
5455from .binary_sensor import async_create_preview_binary_sensor
5556from .const import CONF_PRESS , CONF_TURN_OFF , CONF_TURN_ON , DOMAIN
6364 DEFAULT_STEP ,
6465 async_create_preview_number ,
6566)
66- from .select import CONF_OPTIONS , CONF_SELECT_OPTION
67+ from .select import CONF_OPTIONS , CONF_SELECT_OPTION , async_create_preview_select
6768from .sensor import async_create_preview_sensor
6869from .switch import async_create_preview_switch
6970from .template_entity import TemplateEntity
@@ -319,6 +320,7 @@ async def _validate_user_input(
319320 "user" : SchemaFlowMenuStep (TEMPLATE_TYPES ),
320321 Platform .ALARM_CONTROL_PANEL : SchemaFlowFormStep (
321322 config_schema (Platform .ALARM_CONTROL_PANEL ),
323+ preview = "template" ,
322324 validate_user_input = validate_user_input (Platform .ALARM_CONTROL_PANEL ),
323325 ),
324326 Platform .BINARY_SENSOR : SchemaFlowFormStep (
@@ -332,6 +334,7 @@ async def _validate_user_input(
332334 ),
333335 Platform .IMAGE : SchemaFlowFormStep (
334336 config_schema (Platform .IMAGE ),
337+ preview = "template" ,
335338 validate_user_input = validate_user_input (Platform .IMAGE ),
336339 ),
337340 Platform .NUMBER : SchemaFlowFormStep (
@@ -341,6 +344,7 @@ async def _validate_user_input(
341344 ),
342345 Platform .SELECT : SchemaFlowFormStep (
343346 config_schema (Platform .SELECT ),
347+ preview = "template" ,
344348 validate_user_input = validate_user_input (Platform .SELECT ),
345349 ),
346350 Platform .SENSOR : SchemaFlowFormStep (
@@ -360,6 +364,7 @@ async def _validate_user_input(
360364 "init" : SchemaFlowFormStep (next_step = choose_options_step ),
361365 Platform .ALARM_CONTROL_PANEL : SchemaFlowFormStep (
362366 options_schema (Platform .ALARM_CONTROL_PANEL ),
367+ preview = "template" ,
363368 validate_user_input = validate_user_input (Platform .ALARM_CONTROL_PANEL ),
364369 ),
365370 Platform .BINARY_SENSOR : SchemaFlowFormStep (
@@ -373,6 +378,7 @@ async def _validate_user_input(
373378 ),
374379 Platform .IMAGE : SchemaFlowFormStep (
375380 options_schema (Platform .IMAGE ),
381+ preview = "template" ,
376382 validate_user_input = validate_user_input (Platform .IMAGE ),
377383 ),
378384 Platform .NUMBER : SchemaFlowFormStep (
@@ -382,6 +388,7 @@ async def _validate_user_input(
382388 ),
383389 Platform .SELECT : SchemaFlowFormStep (
384390 options_schema (Platform .SELECT ),
391+ preview = "template" ,
385392 validate_user_input = validate_user_input (Platform .SELECT ),
386393 ),
387394 Platform .SENSOR : SchemaFlowFormStep (
@@ -400,10 +407,12 @@ async def _validate_user_input(
400407 str ,
401408 Callable [[HomeAssistant , str , dict [str , Any ]], TemplateEntity ],
402409] = {
403- "binary_sensor" : async_create_preview_binary_sensor ,
404- "number" : async_create_preview_number ,
405- "sensor" : async_create_preview_sensor ,
406- "switch" : async_create_preview_switch ,
410+ Platform .ALARM_CONTROL_PANEL : async_create_preview_alarm_control_panel ,
411+ Platform .BINARY_SENSOR : async_create_preview_binary_sensor ,
412+ Platform .NUMBER : async_create_preview_number ,
413+ Platform .SELECT : async_create_preview_select ,
414+ Platform .SENSOR : async_create_preview_sensor ,
415+ Platform .SWITCH : async_create_preview_switch ,
407416}
408417
409418
0 commit comments