Applies gradients derived from 103 bundled Philips Hue scenes to OpenRGB-controlled LEDs, with six mapping modes (sequence, per-device, per-zone, matrix, mirror, shuffle) and five animation modes (static, scroll, pingpong, pulse, wave). Typer/Rich CLI with dry-run preview, device/zone targeting, and a scenes-update command to refresh the bundled dataset from its source gist. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
34 lines
962 B
Python
34 lines
962 B
Python
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from openrgb_hue.client import LedRef
|
|
from openrgb_hue.color import Color
|
|
from openrgb_hue.scenes import Scene, SceneLight
|
|
from openrgb_hue.targets import synthetic_targets
|
|
|
|
|
|
@pytest.fixture
|
|
def sample_scene() -> Scene:
|
|
"""A small hand-built scene with an intentional consecutive duplicate
|
|
(light 2 and 3 share a color) so dedupe behavior is exercised."""
|
|
return Scene(
|
|
name="Test Scene",
|
|
lights=[
|
|
SceneLight("light.hue_1", Color(255, 0, 0), 255),
|
|
SceneLight("light.hue_2", Color(0, 255, 0), 255),
|
|
SceneLight("light.hue_3", Color(0, 255, 0), 255),
|
|
SceneLight("light.hue_4", Color(0, 0, 255), 128),
|
|
],
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def synthetic_leds() -> list[LedRef]:
|
|
return synthetic_targets(12)
|
|
|
|
|
|
@pytest.fixture
|
|
def matrix_leds() -> list[LedRef]:
|
|
return [led for led in synthetic_targets() if led.matrix_row is not None]
|