Automatically change a field using a timer in the card picture-entity

I have several cameras that monitor the house.
There is a card on the picture-entity dashboard in which you can view cameras.
But if you add all the cameras to the dashboard, it will take up a lot of space.

The card has fields:

type: picture-entity
entity: switch.okhrana
image: /local/coff.png
camera_image: camera.1_substream

I wanted to place an picture-entity card on the dashboard and change the source at certain intervals, for example 10 seconds.
Also, if the switch is turned off, the camera field is cleared and a static image is displayed on the card.

List of cameras:

  • “camera.1_substream”,
  • “camera.2_substream”,
  • “camera.N_substream”

If the switch “entity: switch.okhrana” is enabled, then
- Take 1 camera from the list and substitute the value in the “camera_image” field:
camera_image: camera.1_substream
- The timer counts down 10 seconds
- Take 2 camera from the list and substitute the value in the “camera_image” field:
camera_image: camera.2_substream
- The timer counts down 10 seconds
And so on until we reach the end of the list of cameras, after which we return to the first camera.

If the switch “entity: switch.okhrana” is disabled, then
- Clear the “camera_image” field and show a static image “image: /local/camera_off.png”

But I’m new to working with HA and have no idea how to do it.
This is generally possible to do in home assistant?

Perhaps I wrote unclearly, sorry, English is not my native language.