set_light
Turn a model railroad layout light on or off and confirm its actual state. Specify the light by system name or label.
Instructions
Turn a layout light ON or OFF, and report the state actually observed.
Args: name: Light name (JMRI system name like "IL1", or its user-friendly label like "Depot Lighting") or an unambiguous fragment of the label. Case-insensitive. turn_on: True to turn the light ON, False to turn it OFF.
This is a layout light (scenery: depot, street, signal lamps, ...), distinct from a locomotive's F0 headlight function — if the user names a locomotive rather than a place/scene, use set_function or lights_on/lights_off on its DCC address instead. This writes to JMRI; the reported state is re-read after the command, and "confirmed" is honestly reported false if the observed state doesn't match what was requested (e.g. a feedback-wired light that didn't actually switch).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| turn_on | Yes |