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.
Private Properties
Parameters | Description | Default value |
---|---|---|
Data Source | Configurable data sources | key1 |
View Mode | Optional values: Color, Picture | Color |
Property Name | Can be modified. When the obtained data value matches the name, the corresponding color/image will be displayed. | key1 |
Node
Parameters | Description | Default value |
---|---|---|
Width | Overall width | 100 |
Height | Overall height | 100 |
X | Horizontal coordinate | — |
Y | Vertical 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.
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
- The current case takes the
banner page
as an example, and the device needs to be specified; if it is adevice page
, there is no need to specify the device. - The result returned by the data source must be a clear number or string value, such as:
0
,1
,"offline"
,"online"
.
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.