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?