I’ve got a garage floodlight that’s on an amcrest camera module that is being controlled by some curl commands.
I’m wanting to set the area that it’s located in without going into advanced mode and manually taking control of the UI. The light is defined in my configuration.yml as per below.
switch:
- platform: command_line
switches:
garage_floodlight:
command_on: '/usr/bin/curl -s --digest -u admin:password "http://IP/cgi-bin/configManager.cgi?action=setConfig&Lighting_V2\[0\]\[0\]\[1\].Mode=Manual" '
command_off: '/usr/bin/curl -s --digest -u admin:password "http://IP/cgi-bin/configManager.cgi?action=setConfig&Lighting_V2\[0\]\[0\]\[1\].Mode=Off" '
command_state: '/usr/bin/curl -s --digest -u admin:password "http://IP/cgi-bin/configManager.cgi?action=getConfig&name=Lighting_V2\[0\]\[0\]\[1\].Mode" | grep -oc "Manual" ||true'
value_template: '{{ value == "1" }}'
friendly_name: Garage Floodlight
unique_id: garage_floodlight
There doesn’t seem to be a method to define where the switch is located without doing manual control of the UI. It appears in the switch category of the UI. But because it does NOT have a unique_id, it doesn’t appear as though you can assign it to a room. (You can’t assign it a unique_id either).
I get why they updated the API back to make the garage_floodlight the entity id, but the lack of ability to be able to set an entity_id here kind of sucks. If nothing else, how about a toggle to assign an entity_id and a unique_id.
Is there a way to:
a) move the switch to a specific area
b) make it appear like a light
c) keep standard UI control?