Skip to content

Commit

Permalink
Added vinyl scene
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Jan 25, 2024
1 parent 1011751 commit 0cdb6cd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion wideboy/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ class WidgetDucky(


@entity
class WidgetSpinner(ComFrame, ComFade, ComMotion, ComAlpha, ComVisible):
class WidgetVinyl(ComFrame, ComFade, ComMotion, ComAlpha, ComVisible):
pass
10 changes: 5 additions & 5 deletions wideboy/systems/scene/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from .stages.default import StageDefault
from .stages.ducks import StageDucks
from .stages.night import StageNight
from .stages.seven import StageSeven
from .stages.vinyl import StageVinyl
from .sprites import (
build_date_sprite,
build_time_sprite,
Expand Down Expand Up @@ -176,11 +176,11 @@ def _handle_scene_mode_change(self) -> None:
(self.display_info.current_w, self.display_info.current_h),
)
)
# Seven Mode
elif self.scene_mode == "seven":
logger.info("SEVEN MODE")
# Vinyl Mode
elif self.scene_mode == "vinyl":
logger.info("VINYL MODE")
self._switch_stage(
StageSeven(
StageVinyl(
self.entities,
(self.display_info.current_w, self.display_info.current_h),
)
Expand Down
2 changes: 1 addition & 1 deletion wideboy/systems/scene/hass_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ModeSelect(SelectEntity):
description: str = "Mode"
initial_state: str = "default"
options: Dict[str, Any] = {
"options": ["default", "ducks", "night", "seven"],
"options": ["default", "ducks", "night", "vinyl"],
}

def callback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Cache,
WidgetClockDate,
WidgetClockTime,
WidgetSpinner,
WidgetVinyl,
WidgetTileGrid,
)
from ..sprites import build_image_sprite
Expand All @@ -14,7 +14,7 @@
logger = logging.getLogger(__name__)


class StageSeven(Stage):
class StageVinyl(Stage):
image_count: int

def __init__(
Expand All @@ -31,15 +31,15 @@ def setup(self) -> None:

self.stage_entities.extend(
[
WidgetSpinner(
WidgetVinyl(
build_image_sprite(self.cache.surfaces["mode7_vinyl"][0]),
x=-100,
y=0,
z_order=5,
frames=self.cache.surfaces["mode7_vinyl"],
frame_delay=1,
), # type: ignore[call-arg]
WidgetSpinner(
WidgetVinyl(
build_image_sprite(self.cache.surfaces["mode7_vinyl_serato"][0]),
x=420,
y=24,
Expand Down

0 comments on commit 0cdb6cd

Please sign in to comment.