Switch
π‘ Object: Switch (The Binary State Actuator)¶
Represents a fundamental state actuator, such as: - Smart light switch. - Connected outlet. - Relay controlling a device.
Its function: maintain one of two persistent states:
- on β Turned on.
- off β Turned off.
π Concept¶
It is the "digital hand" of the system.
Responsible for performing the most common physical action: opening or closing a circuit.
πΉ Difference from a Button:
The Switch has memory. If it's turned on, it remains on until receiving an order to turn off.
βοΈ Operation¶
- As an actuator, the Switch doesn't measure the environment.
- Receives orders from:
- Sensors.
- Buttons.
- Scheduled timers.
- A rule sends the command β the Switch changes its state property (
on/off) and transmits the signal to the physical device.
β¨ Key Point¶
It is the most basic and essential action component.
Converts the system's logical decisions into tangible changes in the physical world.
π Fundamental Properties and States¶
Simplicity is its strength.
Based on a single property:
stateβ Defines if the device is on or off.
Possible values:
- on β Device activated; circuit closed.
- off β Device deactivated; circuit open.
π Persistent state: maintains its condition until receiving a new command.
π Typical Workflow¶
Example: Automatic light by motion detection
- Event β A Motion sensor changes its state to
detected. - Rule β The "automatic light" automation activates.
- Command β Send order to
Switch_Room_Lightobject to setstate = on. - Action