Conversation
- Add translation keys for all error codes in strings.json, en.json, and de.json - Modify ErrorSensor and WarningSensor to load and use translations - Add extra_state_attributes with raw error codes for automation use - Change separator from comma to comma+space for better readability Co-authored-by: dkarv <3708591+dkarv@users.noreply.github.com>
Add FAQ section explaining how to use error codes in automations Update entity table to clarify translated error messages and attribute access Co-authored-by: dkarv <3708591+dkarv@users.noreply.github.com>
- Move _translate_error method from ErrorSensor and WarningSensor to BwtEntity - Remove code duplication - Remove trailing whitespace for better code style Co-authored-by: dkarv <3708591+dkarv@users.noreply.github.com>
- Create TranslatableErrorMixin class for shared translation logic - Rename _translate_error to _translate_code to reflect dual purpose - Move async_added_to_hass translation loading to mixin - Update ErrorSensor and WarningSensor to use the mixin - Eliminates all code duplication between error and warning sensors Co-authored-by: dkarv <3708591+dkarv@users.noreply.github.com>
- Add _get_errors() helper method to ErrorSensor - Add _get_warnings() helper method to WarningSensor - Remove extra blank line between classes - Further reduce code duplication Co-authored-by: dkarv <3708591+dkarv@users.noreply.github.com>
Add comprehensive docstring to TranslatableErrorMixin class explaining its purpose and the _translations attribute lifecycle Co-authored-by: dkarv <3708591+dkarv@users.noreply.github.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.
No description provided.