Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use entity component translations for update entity #18608

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Nov 10, 2023

Proposed change

Previously, all the state display logic for update entities was done with the state translation function.
One of the issue was that on state was using the latest version number in the automation editor as state translation.

CleanShot 2023-11-10 at 15 25 49

This PR move the display logic into card components (e.g. tile, entity row, state content) so state translation can work in the automation editor.

After the fix, automation editor uses translations and card uses special display.

CleanShot 2023-11-10 at 15 40 36
CleanShot 2023-11-10 at 15 40 04

Needs home-assistant/core#103752

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

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

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@piitaya piitaya marked this pull request as ready for review November 10, 2023 14:44
@piitaya piitaya changed the title Use entity components translations for update entity Use entity component translations for update entity Nov 10, 2023
@piitaya piitaya added backend merged The backend PR for this frontend PR has been merged and removed wait for backend labels Nov 12, 2023
@piitaya piitaya requested a review from bramkragten November 21, 2023 13:27
@piitaya piitaya force-pushed the update_entity_state_translation branch from d740364 to 7da2451 Compare November 21, 2023 13:28
@bramkragten bramkragten merged commit eef0245 into dev Nov 22, 2023
13 checks passed
@bramkragten bramkragten deleted the update_entity_state_translation branch November 22, 2023 11:43
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend merged The backend PR for this frontend PR has been merged cla-signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants