Thread-friendly controller contract for lighting applications.
More...
|
| bool | is_connected (self) |
| | Return whether the controller is connected to its lighting device.
|
| LightingState | current_state (self) |
| | Return the most recently requested lighting state.
|
| Future[None] | connect (self) |
| | Begin connecting to the lighting device.
|
| Future[None] | disconnect (self) |
| | Begin disconnecting from the lighting device.
|
|
None | close (self) |
| | Release controller resources and prevent further operations.
|
| Future[None] | set_power (self, bool enabled) |
| | Set lighting power.
|
| Future[None] | set_color (self, RgbColor color) |
| | Set the static RGB color.
|
| Future[None] | set_brightness (self, int percent) |
| | Set brightness as a percentage.
|
| Future[None] | set_color_temperature (self, int percent) |
| | Set the warm-to-cool white balance.
|
| Future[None] | set_pattern (self, int pattern_index) |
| | Select a built-in lighting pattern.
|
| Future[None] | set_music_mode (self, int eq_mode) |
| | Select a sound-reactive equalizer mode.
|
| Future[None] | set_custom_pattern_mode (self, CustomPatternMode mode) |
| | Set the animation mode for a custom pattern.
|
| Future[None] | set_custom_pattern_direction (self, bool is_forward) |
| | Set the animation direction for a custom pattern.
|
Thread-friendly controller contract for lighting applications.
◆ connect()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.connect |
( |
| self | ) |
|
Begin connecting to the lighting device.
- Returns
- Future completed when the device is ready, or completed with the connection exception.
◆ current_state()
| LightingState lighting.lighting_controller_if.LightingControllerIf.current_state |
( |
| self | ) |
|
Return the most recently requested lighting state.
- Returns
- Immutable snapshot of connection and lighting settings.
◆ disconnect()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.disconnect |
( |
| self | ) |
|
Begin disconnecting from the lighting device.
- Returns
- Future completed when disconnection finishes, or completed with the disconnection exception.
◆ is_connected()
| bool lighting.lighting_controller_if.LightingControllerIf.is_connected |
( |
| self | ) |
|
Return whether the controller is connected to its lighting device.
- Return values
-
| True | The device connection is active. |
| False | The device is disconnected. |
◆ set_brightness()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.set_brightness |
( |
| self, |
|
|
int | percent ) |
Set brightness as a percentage.
- Parameters
-
| percent | Brightness in the inclusive range 0 through 100. |
- Returns
- Future completed when the command has been processed.
◆ set_color()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.set_color |
( |
| self, |
|
|
RgbColor | color ) |
Set the static RGB color.
- Parameters
-
| color | Red, green, and blue channel values. |
- Returns
- Future completed when the command has been processed.
◆ set_color_temperature()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.set_color_temperature |
( |
| self, |
|
|
int | percent ) |
Set the warm-to-cool white balance.
- Parameters
-
| percent | Color temperature percentage accepted by the device. |
- Returns
- Future completed when the command has been processed.
◆ set_custom_pattern_direction()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.set_custom_pattern_direction |
( |
| self, |
|
|
bool | is_forward ) |
Set the animation direction for a custom pattern.
- Parameters
-
| is_forward | True for forward animation. |
- Returns
- Future completed when the command has been processed.
◆ set_custom_pattern_mode()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.set_custom_pattern_mode |
( |
| self, |
|
|
CustomPatternMode | mode ) |
Set the animation mode for a custom pattern.
- Parameters
-
| mode | Custom animation mode. |
- Returns
- Future completed when the command has been processed.
◆ set_music_mode()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.set_music_mode |
( |
| self, |
|
|
int | eq_mode ) |
Select a sound-reactive equalizer mode.
- Parameters
-
| eq_mode | Device-specific equalizer mode. |
- Returns
- Future completed when the command has been processed.
◆ set_pattern()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.set_pattern |
( |
| self, |
|
|
int | pattern_index ) |
Select a built-in lighting pattern.
- Parameters
-
| pattern_index | Device-specific pattern index. |
- Returns
- Future completed when the command has been processed.
◆ set_power()
| Future[None] lighting.lighting_controller_if.LightingControllerIf.set_power |
( |
| self, |
|
|
bool | enabled ) |
Set lighting power.
- Parameters
-
| enabled | True to turn the lights on. |
- Returns
- Future completed when the command has been processed.
The documentation for this class was generated from the following file:
- controllers/lighting/lighting_controller_if.py