Skip to content

chore: remove dead code + correct set_setting typing (ERR-9, dead code)#598

Merged
tempus2016 merged 1 commit into
mainfrom
chore/deadcode-typing-cleanup
Jun 25, 2026
Merged

chore: remove dead code + correct set_setting typing (ERR-9, dead code)#598
tempus2016 merged 1 commit into
mainfrom
chore/deadcode-typing-cleanup

Conversation

@tempus2016

Copy link
Copy Markdown
Owner

Dead code + typing cleanup (ERR-9, §3.3)

  • storage.get_setting/set_setting were annotated str despite storing bools/numbers/lists (the root of float-as-string round-tripping). Annotated as Any.
  • rewards-card: removed dead .reward-row.dynamic / .cost-badge.dynamic-cost / .dynamic-indicator CSS — dynamic/surge pricing was deliberately removed long ago.
  • child-card: removed the unused tomorrowUTC local in _getMidnightCountdown.

Testing

pytest tests/test_storage.py → 40 passed; both cards register on ha-dev via browserless with zero console errors.

From AUDIT_REPORT.md §3.2 / §3.3.

- storage.get_setting/set_setting were typed str despite storing
  bools/numbers/lists (the source of float-as-string round-tripping);
  annotate as Any.
- rewards-card: drop dead .reward-row.dynamic/.dynamic-cost/.dynamic-indicator
  CSS (dynamic/surge pricing was deliberately removed).
- child-card: remove unused tomorrowUTC local in _getMidnightCountdown.

Verified: storage tests pass; both cards register on ha-dev with no
console errors.
@github-actions github-actions Bot added backend Python integration code cards Lovelace cards / frontend (www/*.js) labels Jun 25, 2026
@tempus2016 tempus2016 merged commit e375f33 into main Jun 25, 2026
10 checks passed
@tempus2016 tempus2016 deleted the chore/deadcode-typing-cleanup branch June 25, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Python integration code cards Lovelace cards / frontend (www/*.js)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant