Inner workings of scene.turn_on service

Continuing the discussion from 0.101: Airly, Apprise, Sinch, Solar-Log, Microsoft Teams:

Based on this comment and recent experience with adding some code, I decided to dive into this issue, hoping to add a transition option to the scene.turn_on service. However, I am mystified by the combination of the scene.turn_on service and reproduce state. If I add a transition field to homeassistant/components/scene/services.yaml it is shown in the hints on the developer screen, but it is not accepted as input. I can’t find where the validation happens for this service.

homeassistant/components/scene/__init__.py registers the service but without any validation whatsoever. Adding a validation schema there does not work. The fact that it links to a callback that raises a NotImplementedError() implies this does nothing anyway.

So I assume the whole thing is handled somewhere else and that there in the end it will trigger all registered reproduce_state() calls? So does anyone know where that is so I could add an optional transition field?

Maybe at least a hint on where I can find more info? :frowning: