Skip to content

Auto-inject elapsed.Event.Off when transitioning to fade_in state#9

Merged
majamassarini merged 3 commits intodevfrom
sound-player-fade-in-elapsed
Feb 21, 2026
Merged

Auto-inject elapsed.Event.Off when transitioning to fade_in state#9
majamassarini merged 3 commits intodevfrom
sound-player-fade-in-elapsed

Conversation

@majamassarini
Copy link
Owner

@majamassarini majamassarini commented Jan 28, 2026

No description provided.

@majamassarini majamassarini force-pushed the sound-player-fade-in-elapsed branch from 5795dab to 7adac3a Compare February 2, 2026 17:58
Configure CI to run unit tests on PRs against main or dev branches.
Uses Python 3.8 and runs unittest discover on home/tests directory.

Add coverage reporting to GitHub Actions workflow

Fix doctest in options.py for redis_port type

Fix timezone compatibility for both pytz and ZoneInfo
Fixes AttributeError: 'ZoneInfo' object has no attribute 'localize'

Fix APScheduler timezone compatibility and disable osmer_fvg builder tests

Assisted-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Explain why sending an event to a state machine can have no effect
even when it appears it should work. Include example showing how
presence.Event.Off can prevent sound player fade in transitions.

Add explanation about why you cannot send multiple events at the same
time when processing order matters. Include example showing the need
for state-based triggers (state.entering.Trigger) instead of sending
events simultaneously.

Assisted-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove `self._is_on = True` from alarmed/off/state.py __init__.
This line contradicted the IsOff mixin, which defines is_on as False.

The bug caused:
- KNX plugin to not send on/off commands during alarmed state toggles
  (both alarmed_on and alarmed_off incorrectly reported is_on=True)
- Zone lights to stop toggling when alarmed
- Lights to get stuck in forced_off after alarmed transitions

The state now correctly inherits is_on=False from the IsOff mixin,
allowing proper KNX command generation during toggle transitions.

Assisted-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@majamassarini majamassarini force-pushed the sound-player-fade-in-elapsed branch from 36acac2 to fd73d9f Compare February 21, 2026 18:03
@majamassarini majamassarini merged commit 9bfe428 into dev Feb 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant