laborchestrator.traffic_light module

laborchestrator.traffic_light.TrafficLight(component_id, size=60)[source]

Creates a reusable traffic light component with adjustable size.

Parameters:
  • component_id (str) – The unique identifier for the component.

  • size (int) – The size of the traffic lights (width and height in pixels).

Returns:

A Dash component representing the traffic light.

Return type:

html.Div

laborchestrator.traffic_light.register_traffic_light_callbacks(app, component_id)[source]

Registers the callback for the traffic light component.

Parameters:
  • app (Dash) – The Dash app instance.

  • component_id (str) – The unique identifier of the traffic light.