Skip to main content

PilotLamp

The PilotLamp component can be used to display device status, alarms, etc.This article introduces the detailed configuration method of the indicator light component.

pilotLamp.jpg

Private Properties​

Parameters
Description
Default value
Data SourceConfigurable data sourceskey1
View ModeOptional values: Color, PictureColor
Property NameCan be modified. When the obtained data value matches the name, the corresponding color/image will be displayed.key1

Node​

Parameters
Description
Default value
WidthOverall width100
HeightOverall height100
XHorizontal coordinate—
YVertical coordinate—

Application Examples​

The IoT status of the device is displayed through the indicator light component, and the corresponding color or picture can be configured according to the status.


Step 1: Add components​

Above the component list on the left side of the canvas, enter Indicator Light, find the component, and then drag the component to the middle canvas. list_01

Step 2: Configure the data source​

When you need to use this component to display and set device properties, or display data returned by the interface, you need to configure the corresponding data source.

⚠️ Note

  1. The current case takes the banner page as an example, and the device needs to be specified; if it is a device page, there is no need to specify the device.
  2. The result returned by the data source must be a clear number or string value, such as:0, 1, "offline", "online".

list_01

Step 3: Configure the style​

Dynamically configure the corresponding color or image based on the result returned by the interface.

Notes:If the device IoT status includes multiple situations, you can configure the corresponding color or picture for each state in turn.

list_01