Skip to content

refactor: enforce Core Mission compliance across all domains#31

Merged
Faerkeren merged 1 commit into
mainfrom
review/codebase-cleanup
Apr 26, 2026
Merged

refactor: enforce Core Mission compliance across all domains#31
Faerkeren merged 1 commit into
mainfrom
review/codebase-cleanup

Conversation

@Faerkeren

Copy link
Copy Markdown
Contributor

Summary

  • Replace raw turn_on/turn_off with intent-specific methods across all domains (Light, Switch, Climate, MediaPlayer, BinarySensor)
  • Make call_service private (_call_service) at Entity, HAClient, and SyncHAClient layers
  • Add NumPy-style docstrings to all public APIs
  • Remove unused UnsupportedOperationError; add missing Timer export and SyncHAClient.scene()/timer() accessors

Domain Changes

Domain Before After
Light turn_on(brightness=50) set_brightness(50), on(), off(), set_kelvin(), set_rgb(), set_color()
Switch turn_on() / turn_off() on() / off() / toggle()
Climate turn_on() / turn_off() set_hvac_mode() only
MediaPlayer turn_on() / turn_off() power_on() / power_off()
BinarySensor on_turn_on / on_turn_off on_activate / on_deactivate

Quality

  • 146 tests pass
  • 95.35% coverage (threshold: 95%)
  • Lint, format, and mypy all clean

Replace raw turn_on/turn_off with intent-specific methods:
- Light: on(), off(), set_brightness(), set_kelvin(), set_rgb(), set_color()
- Switch: on(), off(), toggle()
- Climate: remove turn_on/turn_off, use set_hvac_mode()
- MediaPlayer: power_on(), power_off()
- BinarySensor: on_activate/on_deactivate listeners

Make call_service private (_call_service) at Entity, HAClient, and
SyncHAClient layers. Remove unused UnsupportedOperationError. Add
SyncHAClient.scene() and timer() accessors. Re-export Timer from
package. Add NumPy-style docstrings to all public APIs.
@Faerkeren Faerkeren merged commit b9a31c8 into main Apr 26, 2026
12 checks passed
@Faerkeren Faerkeren deleted the review/codebase-cleanup branch April 26, 2026 20:05
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