Camera Push Integration - Need help

Hi, i want to have multiple cameras with push platform, but I don’t really understand how can I have multiple of the same platform. I would love to have them all on a different file than configuration.yaml to keep things nice and clean.

This is what I have now on my configuration.yaml


camera:
  - platform: push
    name: synoai_camera1
    webhook_id: synoai_camera1
    timeout: 1
    buffer: 1
camera:
  - platform: push
    name: synoai_camera2
    webhook_id: synoai_camera2
    timeout: 1
    buffer: 1
camera:
  - platform: push
    name: synoai_camera3
    webhook_id: synoai_camera3
    timeout: 1
    buffer: 1
camera:
  - platform: push
    name: synoai_camera4
    webhook_id: synoai_camera4
    timeout: 1
    buffer: 1
camera:
  - platform: push
    name: synoai_camera5
    webhook_id: synoai_camera5
    timeout: 1
    buffer: 1
camera:
  - platform: push
    name: synoai_camera6
    webhook_id: synoai_camera6
    timeout: 1
    buffer: 1

Studio Code Server warns me about a duplicate key.
Can anybody help me get the code correctly?

Just solved the first problem on this code, now want to have it on a separated file:


camera:
  - platform: push
    name: synoai_camera1
    webhook_id: synoai_camera1
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera2
    webhook_id: synoai_camera2
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera3
    webhook_id: synoai_camera3
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera4
    webhook_id: synoai_camera4
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera5
    webhook_id: synoai_camera5
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera6
    webhook_id: synoai_camera6
    timeout: 1
    buffer: 1

Seems like when you get your ideas in order trying to explain your problem to someone else, you may solve your problem!

On my configuration.yaml just added this:

camera: !include camera.yaml

Then I created the file camera.yaml with this data:

  - platform: push
    name: synoai_camera1
    webhook_id: synoai_camera1
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera2
    webhook_id: synoai_camera2
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera3
    webhook_id: synoai_camera3
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera4
    webhook_id: synoai_camera4
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera5
    webhook_id: synoai_camera5
    timeout: 1
    buffer: 1
  - platform: push
    name: synoai_camera6
    webhook_id: synoai_camera6
    timeout: 1
    buffer: 1

Nice and clean!