How to create multiple rest switches?

Hi I am new to home assistant. I just developed a lamp that could be controlled through REST interface and used following configuration in the yaml file:

switch:

  • platform: rest
    resource: http://192.168.1.108/endpoint
    body_on: ‘state=ON’
    body_off: ‘state=OFF’
    headers:
    Content-Type: application/x-www-form-urlencoded
    verify_ssl: false
    scan_interval: 1

I see from the front end a new entity called “switch.rest_switch” has been created and it works fine to turn on/off my lamp. My question is, how should I create multiple instances of such switches? And is there a way to give it a unique name or id?

(Please use this grafik icon when integrating configuration and code sequences)

Simply duplicate the sequence starting with - platform: rest to generate more switches. If you provide the name attribute, HA will take it’s content as a hint to compute an entity-id of (name: 'my switch' will result in an entity of switch.my_switch).