Motion controlled Camera Card

Hello,
I have a motioneyeos camera and want to show the video image on a Shelly Wall Display.
To save network bandwidth I want to:

  • grab a image (via snapshot url) only every 20s, if no motion is detected
  • start the live stream view, if a motion is detected

For the Motion detection from the motioneye camera, I have already a binary switch in HAS.
The question is: how can i create a camera card which toogles between “20s still image” and live view depending on the status of the motion detection binary switch?