Dateien nach "app/animations" hochladen
This commit is contained in:
1 parent
8f8d206166
commit
1c5b8c5685
5 files changed
+256
No files matched your search
@@ -0,0 +1,20 @@
|
||||
"""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())
|
||||
Reference in new issue
Block a user