@@ -184,46 +184,59 @@ async def async_setup(hass, config):
184184
185185 hass .data [DOMAIN ] = {CONF_PLATE : {}}
186186
187- component = hass .data [DOMAIN ][CONF_COMPONENT ] = EntityComponent (
188- _LOGGER , DOMAIN , hass
189- )
187+ component = hass .data [DOMAIN ][CONF_COMPONENT ] = EntityComponent (_LOGGER , DOMAIN , hass )
190188
191- component .async_register_entity_service (SERVICE_WAKEUP , {}, "async_wakeup" )
189+ # Use cv.make_entity_service_schema for all services for consistency
190+ component .async_register_entity_service (
191+ SERVICE_WAKEUP ,
192+ cv .make_entity_service_schema ({}),
193+ "async_wakeup" ,
194+ )
192195 component .async_register_entity_service (
193- SERVICE_PAGE_NEXT , {}, "async_change_page_next"
196+ SERVICE_PAGE_NEXT ,
197+ cv .make_entity_service_schema ({}),
198+ "async_change_page_next" ,
194199 )
195200 component .async_register_entity_service (
196- SERVICE_PAGE_PREV , {}, "async_change_page_prev"
201+ SERVICE_PAGE_PREV ,
202+ cv .make_entity_service_schema ({}),
203+ "async_change_page_prev" ,
197204 )
198205 component .async_register_entity_service (
199- SERVICE_PAGE_CHANGE , {vol .Required (ATTR_PAGE ): int }, "async_change_page"
206+ SERVICE_PAGE_CHANGE ,
207+ cv .make_entity_service_schema ({vol .Required (ATTR_PAGE ): int }),
208+ "async_change_page" ,
200209 )
201210 component .async_register_entity_service (
202- SERVICE_LOAD_PAGE , {vol .Required (ATTR_PATH ): cv .isfile }, "async_load_page"
211+ SERVICE_LOAD_PAGE ,
212+ cv .make_entity_service_schema ({vol .Required (ATTR_PATH ): cv .isfile }),
213+ "async_load_page" ,
203214 )
204215 component .async_register_entity_service (
205- SERVICE_CLEAR_PAGE , {vol .Optional (ATTR_PAGE ): int }, "async_clearpage"
216+ SERVICE_CLEAR_PAGE ,
217+ cv .make_entity_service_schema ({vol .Optional (ATTR_PAGE ): int }),
218+ "async_clearpage" ,
206219 )
207220 component .async_register_entity_service (
208221 SERVICE_COMMAND ,
209- {
222+ cv . make_entity_service_schema ( {
210223 vol .Required (ATTR_COMMAND_KEYWORD ): cv .string ,
211224 vol .Optional (ATTR_COMMAND_PARAMETERS , default = "" ): cv .string ,
212- },
225+ }) ,
213226 "async_command_service" ,
214227 )
215-
216228 component .async_register_entity_service (
217229 SERVICE_CONFIG ,
218- {
230+ cv . make_entity_service_schema ( {
219231 vol .Required (ATTR_CONFIG_SUBMODULE ): cv .string ,
220232 vol .Required (ATTR_CONFIG_PARAMETERS ): cv .string ,
221- },
233+ }) ,
222234 "async_config_service" ,
223235 )
224-
225236 component .async_register_entity_service (
226- SERVICE_PUSH_IMAGE , PUSH_IMAGE_SCHEMA , "async_push_image"
237+ SERVICE_PUSH_IMAGE ,
238+ PUSH_IMAGE_SCHEMA ,
239+ "async_push_image" ,
227240 )
228241
229242 hass .data [DOMAIN ][DATA_IMAGES ] = dict ()
0 commit comments