fix: unify state logic, fix lost/travelling zones, accept both spellings#41
Open
genebean wants to merge 1 commit into
Open
fix: unify state logic, fix lost/travelling zones, accept both spellings#41genebean wants to merge 1 commit into
genebean wants to merge 1 commit into
Conversation
- Make getWizardState() the single source of truth: it now accepts a full wizard config object so it can check proximity_sensor; set hass populates a _wizardStates cache and drawTime reads from it instead of reimplementing state logic independently (which caused divergence and broke permanent locations) - Remove pre-adding of lost/travelling zones: they now only appear on the dial when a wizard is actually in that state - Remove the && this.config.travelling gate on travelling detection: moving by velocity or proximity sensor triggers Travelling regardless of whether the custom text key is set - Proximity sensor check moved into getWizardState so both zone-building (set hass) and hand-positioning (drawTime) use the same decision - Accept both 'travelling' and 'traveling' (American spelling) in config - Accept both 'fontName' and 'fontname' spellings in config - Default lostState to "Lost", travellingState to "Travelling" (was "Away") - Reduce wizardOffset spread factor from 0.6 to 0.3 so hands center more accurately on their zone label Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I really like this card but the bugs were bothering me so I got Claude Code to help me make things better. This is the second of a set of 3 PRs that when combined are what I am now using at home. The first one is #40