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

Add support for icon translations #1579

Closed
make-all opened this issue Jan 30, 2024 · 0 comments
Closed

Add support for icon translations #1579

make-all opened this issue Jan 30, 2024 · 0 comments

Comments

@make-all
Copy link
Owner

make-all commented Jan 30, 2024

New feature coming in HA 2024.2.

Provide a json file with icons that can show in various states.

https://developers.home-assistant.io/blog/2024/01/19/icon-translations

Uses translation_key, so once implemented we can slowly move different common entities such as child locks, timers to fully translated for name, state and icon.

At the same time, support can be added for translation placeholders.
https://developers.home-assistant.io/blog/2024/01/19/entity-translations-placeholders

@make-all make-all added the enhancement New feature or request label Jan 30, 2024
@make-all make-all added the maintenance Changes to keep up with HA development label Feb 11, 2024
make-all added a commit that referenced this issue Feb 25, 2024
In HA 2024.2, climate devices are expected to report support of
turn_on and turn_off services.

During the deprecation period until 2025.1, warnings are reported in
the log if these methods are present and the device is not reporting
this support. This change will reduce these messages to just those
devices that actually do not support the methods (using the methods
would throw an exception).

Issue #1579
make-all added a commit that referenced this issue Feb 26, 2024
- Clean up icons that basically match HA 2024.2 defaults

Mostly climate entities that had hvac_mode specific icons defined,
some sensor/binary_sensor classes and buttons that could be class
restart.

Preparation for icon.json support. Issue #1579
make-all added a commit that referenced this issue Feb 27, 2024
When both name and class are missing, but translation_key is available,
use that for the unique_id before defaulting to the entity type only.

Preparation for wider use of translated names.

Issue #1579
make-all added a commit that referenced this issue Feb 27, 2024
make-all added a commit that referenced this issue Mar 1, 2024
- add `translation_key: timer` to more number and select entities
  that are timers by another name.
- remove icons from `class: duration` sensors

Explicit timer icons remain for now on number entities that are
configuring some duration that doesn't strictly match with a "Timer".

Issue #1579
make-all added a commit that referenced this issue Mar 2, 2024
Convert Celsius and Fahrenheit states to lower case to match the
hassfest expectation.  This is undocumented and does not really make
sense for state values, which can be anything, but going with the flow
here.

Issue #1579
make-all added a commit that referenced this issue Mar 3, 2024
Some changes in this version are still unhandled:

ETOP FCU: child lock changed from switch to lock, to match other devices
Holman WX1/2: "Time left" changed from number to sensor
Proscenic M9: Error message changed from sensor to a problem binary_sensor
Rotenso Ronix and Stadler Form Roger: unnamed sensor given PM2.5 class
   (corrects a mistake from previous migration)
Shinco 30D: removes the fault code sensor (moved to an attribute on
   the problem binary_sensor, like other devices)
Vacplus: Fault sensor changed to binary_sensors for general problem
   and tank full
Garza irrigation: alarm binary_sensor changed to problem
   binary_sensor, but cannot be migrated as other legitimate
   binary_sensors for actual alarms are still labelled "alarm"

Issue #1579
@make-all make-all added the unreleased Will be in next release label Mar 4, 2024
@make-all make-all removed enhancement New feature or request unreleased Will be in next release maintenance Changes to keep up with HA development labels Mar 4, 2024
@make-all make-all closed this as completed Mar 4, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
In HA 2024.2, climate devices are expected to report support of
turn_on and turn_off services.

During the deprecation period until 2025.1, warnings are reported in
the log if these methods are present and the device is not reporting
this support. This change will reduce these messages to just those
devices that actually do not support the methods (using the methods
would throw an exception).

Issue make-all#1579
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
- Clean up icons that basically match HA 2024.2 defaults

Mostly climate entities that had hvac_mode specific icons defined,
some sensor/binary_sensor classes and buttons that could be class
restart.

Preparation for icon.json support. Issue make-all#1579
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
When both name and class are missing, but translation_key is available,
use that for the unique_id before defaulting to the entity type only.

Preparation for wider use of translated names.

Issue make-all#1579
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
- add `translation_key: timer` to more number and select entities
  that are timers by another name.
- remove icons from `class: duration` sensors

Explicit timer icons remain for now on number entities that are
configuring some duration that doesn't strictly match with a "Timer".

Issue make-all#1579
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
Convert Celsius and Fahrenheit states to lower case to match the
hassfest expectation.  This is undocumented and does not really make
sense for state values, which can be anything, but going with the flow
here.

Issue make-all#1579
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
Some changes in this version are still unhandled:

ETOP FCU: child lock changed from switch to lock, to match other devices
Holman WX1/2: "Time left" changed from number to sensor
Proscenic M9: Error message changed from sensor to a problem binary_sensor
Rotenso Ronix and Stadler Form Roger: unnamed sensor given PM2.5 class
   (corrects a mistake from previous migration)
Shinco 30D: removes the fault code sensor (moved to an attribute on
   the problem binary_sensor, like other devices)
Vacplus: Fault sensor changed to binary_sensors for general problem
   and tank full
Garza irrigation: alarm binary_sensor changed to problem
   binary_sensor, but cannot be migrated as other legitimate
   binary_sensors for actual alarms are still labelled "alarm"

Issue make-all#1579
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant