Skip to content

Phase 2: HA guidelines compliance#7

Merged
kongo09 merged 4 commits intomainfrom
phase2-ha-guidelines
Mar 6, 2026
Merged

Phase 2: HA guidelines compliance#7
kongo09 merged 4 commits intomainfrom
phase2-ha-guidelines

Conversation

@kongo09
Copy link
Copy Markdown
Owner

@kongo09 kongo09 commented Mar 6, 2026

Summary

  • 2.1 Use translation_key for entity names instead of hardcoded _attr_name (buttons + numbers, all 4 languages)
  • 2.2 Fix iot_class from local_push to calculated (reads storage/bus events, not hardware)
  • 2.3 Replace untyped hass.data[DOMAIN][entry_id] dict with RemoteButtonsData dataclass using entry.runtime_data
  • 2.4 Add tuya_local to after_dependencies (may need revert if hassfest rejects custom integration names)

Test plan

  • All 32 tests pass locally
  • ruff check + ruff format clean
  • CI: hassfest validates manifest (especially tuya_local in after_dependencies)
  • CI: HACS validation passes
  • CI: pytest passes in CI environment

🤖 Generated with Claude Code

kongo09 and others added 4 commits March 6, 2026 11:06
Buttons use translation_key="remote_command" with a command_name placeholder.
Number entities use translation_key for "ir_delay" and "ir_repeat" with
translated names in all four languages (en, de, fr, es).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This integration reads storage and listens to bus events rather than
receiving direct hardware pushes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Define a proper dataclass for runtime data and use entry.runtime_data
instead of hass.data[DOMAIN][entry_id] dict lookups. Buttons receive
the dataclass directly instead of looking up via config_entry_id.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Ensures tuya_local storage is available before remote_buttons scans.
May need to be reverted if hassfest rejects custom integration names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kongo09 kongo09 merged commit c56850f into main Mar 6, 2026
4 checks passed
@kongo09 kongo09 deleted the phase2-ha-guidelines branch March 6, 2026 13:52
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