API#
PLC#
- class lvmecp.lights.LightsController(plc)[source]#
Bases:
objectController for the light settings.
- Parameters
plc (PLC) –
- get_code(light)[source]#
Returns the short-form code for a light. Case-insensitive.
- Parameters
light (str) – The light for which the code is seeked.
Examples
>>> get_code('telescope_red') 'tr' >>> get_code('telescope bright') 'tb' >>> get_code('uMa Room') 'uma'
- Raises
ValueError – When a code cannot be found for the input light.
- Parameters
light (str) –
- get_flag(light)[source]#
Gets the
LightStatusflag associated with a light.- Parameters
light (str) – The light for which the
LightStatusa flag is requested. It can be specified in short form (e.g.,tr), using underscores (telescope_red), or spaces (telescope red). The light name is case-insensitive.
- async get_light_status(light, update=True)[source]#
Returns the status of a light.
- Parameters
- Returns
- Raises
ValueError – If the light is unknown.
- Return type