Files

21 lines
556 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Animation registry – add new animations here."""
from .chill import ChillAnimation
from .gaming import GamingAnimation
from .party import PartyAnimation
# Map of mode-name (lowercase) → Animation class
# The MQTT payload / HTTP body should match these keys.
REGISTRY = {
"chill": ChillAnimation,
"chillmode": ChillAnimation,
"party": PartyAnimation,
"partymode": PartyAnimation,
"gaming": GamingAnimation,
"gamingmode": GamingAnimation,
}
def get_animation_class(name: str):
return REGISTRY.get(name.strip().lower())