Display video for certain time

I’ve got a couple of Nest camera’s and a Nest doorbell, all of which have the person detected variable available so currently have them running an automation which uses TTS to announce that someone has been seen. I’d like to extend this so it also then shows the live video feed off the camera on one of the homehubs. Adding the second action works but how do you then set a timer so it only shows for say 20 seconds, as a default it turns the live feed on but then just remains there.

Delay 20 seconds then stop video or change source to home may work

No idea - all a bit new to HA…

So far have that section of YAML as:

service: media_player.play_media
target:
  entity_id: media_player.nesthubmaxaefe
data:
  media_content_id: media-source://camera/camera.garden
  media_content_type: application/vnd.apple.mpegurl
metadata:
  title: null
  thumbnail: /api/camera_proxy/camera.garden
  media_class: video
  children_media_class: null
  navigateIds:
    - {}
    - media_content_type: app
      media_content_id: media-source://camera
delay: 00:00:30
  - service: media_player.turn_off
    target:
      entity_id: media_player.nesthubmaxaefe
enabled: true

That’s playing the video feed but doesn’t then stop after the 30 seconds :frowning: