from dataclasses import dataclass import struct @dataclass class ColorRGBW: r: float g: float b: float w: float def as_bytes(self) -> bytes: return struct.pack(" bytes: return struct.pack(" bytes: return self.color.as_bytes() @dataclass class EffectAlexaSwipeConfig: primary_color_width: float # in degrees transition_width: float # in degrees swipe_speed: float # in degrees per second bell_curve_width_in_leds: float start_position: float # in degrees forward: bool primary_color: ColorRGBW secondary_color: ColorRGBW def as_bytes(self) -> bytes: return struct.pack( " bytes: return struct.pack(" bytes: return struct.pack("