Skip to content

Conversation

@stuartp44
Copy link
Owner

This pull request adds translation support and refactors sensor state handling for the MiniBrew integration. The main changes include introducing translation files for user-facing strings, updating sensor classes to use translation keys, and standardizing sensor state values for consistency and localization.

Translation and Localization Support

  • Added new translation files strings.json and translations/en.json to provide localized names and states for configuration steps, options, errors, and all sensor entities. This enables user-facing strings to be easily translated and managed.

Sensor Refactoring and Standardization

  • Updated all sensor classes in sensor.py to include an _attr_translation_key attribute, linking each sensor to its translation entry for name and state. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]

  • Refactored sensor state values to use standardized, lower-case identifiers (e.g., "online", "offline", "updating", "not_updating", "action_required", "no_action_required", "unknown") instead of human-readable strings. This allows the frontend to display localized states based on translations. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Error Handling Improvements

  • Simplified and improved error handling in the config flow by catching all exceptions and logging unexpected errors, ensuring users see a generic error message for unknown failures.

These changes collectively enhance internationalization, maintainability, and user experience for the MiniBrew integration.

@stuartp44 stuartp44 linked an issue Jan 16, 2026 that may be closed by this pull request
@stuartp44 stuartp44 self-assigned this Jan 16, 2026
@stuartp44 stuartp44 added preview Will create a preview release v0.6.0-preview and removed preview Will create a preview release labels Jan 16, 2026
@stuartp44 stuartp44 added the preview-release Creates a preview release label Jan 16, 2026
@github-actions
Copy link
Contributor

Preview Release Created

A preview release has been created for testing this PR.

Version: 0.5.0-preview.8.bb19f04
Release: https://github.com/stuartp44/hambrewclient/releases/tag/untagged-b72232ffee28b2766916

How to Test

  1. Go to the draft release
  2. Download minibrew-0.5.0-preview.8.bb19f04.zip
  3. Extract to your Home Assistant custom_components directory
  4. Restart Home Assistant
  5. Test the changes and report back here

Or install directly via HACS:

# Add custom repository in HACS:
https://github.com/stuartp44/hambrewclient

# Then select version: 0.5.0-preview.8.bb19f04

WARNING: This is a preview release - do not use in production!

Once testing is complete and approved, this PR can be merged for an official release.

@github-actions
Copy link
Contributor

Preview Release Created

A preview release has been created for testing this PR.

Version: 0.5.0-preview.8.d4dfcd1
Release: https://github.com/stuartp44/hambrewclient/releases/tag/v0.5.0-preview.8.d4dfcd1

How to Test

  1. Go to the draft release
  2. Download minibrew-0.5.0-preview.8.d4dfcd1.zip
  3. Extract to your Home Assistant custom_components directory
  4. Restart Home Assistant
  5. Test the changes and report back here

Or install directly via HACS:

# Add custom repository in HACS:
https://github.com/stuartp44/hambrewclient

# Then select version: 0.5.0-preview.8.d4dfcd1

WARNING: This is a preview release - do not use in production!

Once testing is complete and approved, this PR can be merged for an official release.

@github-actions
Copy link
Contributor

Preview Release Created

A preview release has been created for testing this PR.

Version: 0.5.0-preview.8.147257d
Release: https://github.com/stuartp44/hambrewclient/releases/tag/v0.5.0-preview.8.147257d

How to Test

  1. Go to the draft release
  2. Download minibrew-0.5.0-preview.8.147257d.zip
  3. Extract to your Home Assistant custom_components directory
  4. Restart Home Assistant
  5. Test the changes and report back here

Or install directly via HACS:

# Add custom repository in HACS:
https://github.com/stuartp44/hambrewclient

# Then select version: 0.5.0-preview.8.147257d

WARNING: This is a preview release - do not use in production!

Once testing is complete and approved, this PR can be merged for an official release.

@github-actions
Copy link
Contributor

Preview Release Created

A preview release has been created for testing this PR.

Version: 0.5.0-preview.8.cd85a49
Release: https://github.com/stuartp44/hambrewclient/releases/tag/v0.5.0-preview.8.cd85a49

How to Test

  1. Go to the draft release
  2. Download minibrew-0.5.0-preview.8.cd85a49.zip
  3. Extract to your Home Assistant custom_components directory
  4. Restart Home Assistant
  5. Test the changes and report back here

Or install directly via HACS:

# Add custom repository in HACS:
https://github.com/stuartp44/hambrewclient

# Then select version: 0.5.0-preview.8.cd85a49

WARNING: This is a preview release - do not use in production!

Once testing is complete and approved, this PR can be merged for an official release.

@github-actions
Copy link
Contributor

Preview Release Created

A preview release has been created for testing this PR.

Version: 0.5.0-preview.8.df8e564
Release: https://github.com/stuartp44/hambrewclient/releases/tag/v0.5.0-preview.8.df8e564

How to Test

  1. Go to the draft release
  2. Download minibrew-0.5.0-preview.8.df8e564.zip
  3. Extract to your Home Assistant custom_components directory
  4. Restart Home Assistant
  5. Test the changes and report back here

Or install directly via HACS:

# Add custom repository in HACS:
https://github.com/stuartp44/hambrewclient

# Then select version: 0.5.0-preview.8.df8e564

WARNING: This is a preview release - do not use in production!

Once testing is complete and approved, this PR can be merged for an official release.

@stuartp44 stuartp44 merged commit 0af84d2 into main Jan 16, 2026
5 checks passed
@stuartp44 stuartp44 deleted the stu/add_language_trans_and_fix_config_flow branch January 16, 2026 19:45
@github-actions
Copy link
Contributor

🧹 Cleaned up 5 preview release(s) for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-release Creates a preview release preview-released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconfigure the integration throws an error

2 participants