Skip to content

Add descriptions for sensor statistics repair issues#167464

Closed
JamieMagee wants to merge 1 commit into
home-assistant:devfrom
JamieMagee:fix-sensor-issue-descriptions
Closed

Add descriptions for sensor statistics repair issues#167464
JamieMagee wants to merge 1 commit into
home-assistant:devfrom
JamieMagee:fix-sensor-issue-descriptions

Conversation

@JamieMagee
Copy link
Copy Markdown
Contributor

Proposed change

Three sensor repair issues (units_changed, state_class_removed, mean_type_changed) have empty description fields in strings.json. All three are created with is_fixable=False, which requires a description translation. Empty strings get stripped during translation compilation, so the keys are missing and the translation validation fails.

Added descriptions for each using the placeholders already passed by recorder.py.

Type of change

  • Bugfix (non-breaking change which fixes an issue)

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

To help with the load of incoming pull requests:

@JamieMagee JamieMagee requested a review from a team as a code owner April 5, 2026 18:44
Copilot AI review requested due to automatic review settings April 5, 2026 18:44
@home-assistant home-assistant Bot added bugfix cla-signed core integration: sensor small-pr PRs with less than 30 lines. Top 100 Integration is ranked within the top 100 by usage Top 200 Integration is ranked within the top 200 by usage Top 50 Integration is ranked within the top 50 by usage Quality Scale: internal labels Apr 5, 2026
@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Apr 5, 2026

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (sensor) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of sensor can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign sensor Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes translation validation failures in the Sensor integration by adding missing repair issue descriptions for non-fixable statistics-related issues.

Changes:

  • Add non-empty description strings for the units_changed, state_class_removed, and mean_type_changed repair issues.
  • Use existing placeholders passed from homeassistant/components/sensor/recorder.py to populate the new descriptions.
Show a summary per file
File Description
homeassistant/components/sensor/strings.json Adds repair issue descriptions so translation compilation/validation includes required keys for non-fixable issues.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread homeassistant/components/sensor/strings.json Outdated
The units_changed, state_class_removed, and mean_type_changed issues
were created with empty descriptions, but non-fixable issues require
a description translation. This caused test failures in the
translation validation framework.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes translation validation failures in the Sensor integration by adding missing description strings for non-fixable statistics-related repair issues.

Changes:

  • Add description text for the mean_type_changed issue.
  • Add description text for the state_class_removed issue.
  • Add description text for the units_changed issue, using existing placeholders provided by recorder.py.
Show a summary per file
File Description
homeassistant/components/sensor/strings.json Adds non-empty issue descriptions so translation compilation/validation succeeds for non-fixable repair issues.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

Copy link
Copy Markdown
Member

@arturpragacz arturpragacz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear why this would be needed.

Similar to #167463.

@home-assistant home-assistant Bot marked this pull request as draft April 7, 2026 14:13
@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Apr 7, 2026

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@arturpragacz
Copy link
Copy Markdown
Member

Better solution: #167928.

@JamieMagee JamieMagee closed this Apr 10, 2026
@JamieMagee JamieMagee deleted the fix-sensor-issue-descriptions branch April 10, 2026 17:44
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix cla-signed core integration: sensor Quality Scale: internal small-pr PRs with less than 30 lines. Top 50 Integration is ranked within the top 50 by usage Top 100 Integration is ranked within the top 100 by usage Top 200 Integration is ranked within the top 200 by usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants