Basic Syntax
Components
string
required
A unique identifier for the action. Use descriptive names that indicate the action’s purpose (e.g.,
SensorDataProcessor, HeartbeatMonitor).trigger
required
Specifies when the action executes. Can be time-based (
ON EVERY, ON TIMESTAMP), topic-based (ON TOPIC, ON CHANGE), initialization (ON START), client lifecycle (ON CONNECT, ON DISCONNECT, ON SUBSCRIBE), or omitted for callable actions.statements
required
One or more LoT statements that execute when the action triggers. These can include publishing, variable assignment, conditionals, and Python calls.
Action Structure
Every action follows this general structure:Trigger Types
- Time-Based
- Topic-Based
- Client lifecycle
- Callable
Execute at regular intervals:Supported units:
SECOND(S), MINUTE(S), HOUR(S), DAY(S), WEEK(S)Compatible Keywords
Keywords that can be used within action logic:Variable Operations
Topic Operations
Control Flow
Entities
Python Integration
Extend LoT with Python: Use
CALL PYTHON to execute complex calculations, data validation, or integrate external libraries. See the Python Integration guide for complete syntax and examples.Type Casting
UseAS to cast values when performing comparisons or calculations:
STRING, INT, DOUBLE, BOOL, TIMESTAMP, BYTES
For binary MQTT payloads you want to forward unchanged (protobuf, Modbus frames, image chunks), use PAYLOAD AS BYTES with PUBLISH TOPIC or KEEP TOPIC. See Binary passthrough. To read or write protobuf fields, use GET PROTO and PUBLISH MODEL — see Protobuf Models.
Complete Example
Putting It All Together: This example demonstrates topic extraction, JSON parsing, conditional logic, and publishing - the core patterns you’ll use in most actions.
Next Steps
Action Triggers
Learn about time-based, topic-based, and client lifecycle triggers in detail.
Operations
Master GET, SET, PUBLISH, and conditional logic.

