@@ -174,6 +174,7 @@ def gen_data_entry_schema(
174174 flow_title : int ,
175175 require_step_title : bool ,
176176 mandatory_description : str | None = None ,
177+ subentry_flow : bool = False ,
177178) -> vol .All :
178179 """Generate a data entry schema."""
179180 step_title_class = vol .Required if require_step_title else vol .Optional
@@ -206,9 +207,13 @@ def gen_data_entry_schema(
206207 vol .Optional ("abort" ): {str : translation_value_validator },
207208 vol .Optional ("progress" ): {str : translation_value_validator },
208209 vol .Optional ("create_entry" ): {str : translation_value_validator },
209- vol .Optional ("initiate_flow" ): {str : translation_value_validator },
210- vol .Optional ("entry_type" ): translation_value_validator ,
211210 }
211+ if subentry_flow :
212+ schema [vol .Required ("entry_type" )] = translation_value_validator
213+ schema [vol .Required ("initiate_flow" )] = {
214+ vol .Required ("user" ): translation_value_validator ,
215+ str : translation_value_validator ,
216+ }
212217 if flow_title == REQUIRED :
213218 schema [vol .Required ("title" )] = translation_value_validator
214219 elif flow_title == REMOVED :
@@ -314,6 +319,7 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
314319 integration = integration ,
315320 flow_title = REMOVED ,
316321 require_step_title = False ,
322+ subentry_flow = True ,
317323 ),
318324 slug_validator = vol .Any ("_" , cv .slug ),
319325 ),
0 commit comments