State
busylight_core.vendors.embrava.implementation.state
¶
Embrava Blynclight device state management.
This module defines the State class that manages the complete command structure for Embrava Blynclight devices, including LED control and audio functionality.
Classes¶
busylight_core.vendors.embrava.implementation.state.State
¶
Bases: Word
Complete device state for Embrava Blynclight commands.
The State class manages the full command structure sent to Embrava devices. It controls both LED behavior (color, brightness, flashing) and audio functionality (ringtones, volume, playback control). The state is serialized to bytes for transmission to the hardware.
Source code in src/busylight_core/vendors/embrava/implementation/state.py
Attributes¶
busylight_core.vendors.embrava.implementation.state.State.red
class-attribute
instance-attribute
¶
red = RedField()
busylight_core.vendors.embrava.implementation.state.State.blue
class-attribute
instance-attribute
¶
blue = BlueField()
busylight_core.vendors.embrava.implementation.state.State.green
class-attribute
instance-attribute
¶
green = GreenField()
busylight_core.vendors.embrava.implementation.state.State.off
class-attribute
instance-attribute
¶
off = OffBit()
busylight_core.vendors.embrava.implementation.state.State.dim
class-attribute
instance-attribute
¶
dim = DimBit()
busylight_core.vendors.embrava.implementation.state.State.flash
class-attribute
instance-attribute
¶
flash = FlashBit()
busylight_core.vendors.embrava.implementation.state.State.speed
class-attribute
instance-attribute
¶
speed = SpeedField()
busylight_core.vendors.embrava.implementation.state.State.repeat
class-attribute
instance-attribute
¶
repeat = RepeatBit()
busylight_core.vendors.embrava.implementation.state.State.play
class-attribute
instance-attribute
¶
play = PlayBit()
busylight_core.vendors.embrava.implementation.state.State.music
class-attribute
instance-attribute
¶
music = MusicField()
busylight_core.vendors.embrava.implementation.state.State.volume
class-attribute
instance-attribute
¶
volume = VolumeField()
busylight_core.vendors.embrava.implementation.state.State.mute
class-attribute
instance-attribute
¶
mute = MuteBit()
busylight_core.vendors.embrava.implementation.state.State.initial_value
instance-attribute
¶
busylight_core.vendors.embrava.implementation.state.State.length
instance-attribute
¶
busylight_core.vendors.embrava.implementation.state.State.bits
instance-attribute
¶
busylight_core.vendors.embrava.implementation.state.State.value
property
¶
Return the integer value of the word.
busylight_core.vendors.embrava.implementation.state.State.range
property
¶
Return the range of bit offsets for this word.
busylight_core.vendors.embrava.implementation.state.State.hex
property
¶
Return a string hexadecimal representation of the word.
busylight_core.vendors.embrava.implementation.state.State.bin
property
¶
Return a string binary representation of the word.
Functions¶
busylight_core.vendors.embrava.implementation.state.State.reset
¶
Reset the state to default values.
Sets the device to off state with no audio playback and default flash speed settings.