mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-08 09:56:30 +00:00
Add dev blog about changes to icon translations (#2290)
* Add dev blog about changes to icon translations * Address review comments * Update blog/2024-08-27-changed-icon-translations-schema.md Co-authored-by: Teemu R. <tpr@iki.fi> * Address review comments * Update 2024-08-27-changed-icon-translations-schema.md * Update 2024-08-27-changed-icon-translations-schema.md Apply suggestion from code review * Update 2024-08-27-changed-icon-translations-schema.md Update link --------- Co-authored-by: Teemu R. <tpr@iki.fi>
This commit is contained in:
parent
bc182c7fab
commit
1183c4f92e
33
blog/2024-08-27-changed-icon-translations-schema.md
Normal file
33
blog/2024-08-27-changed-icon-translations-schema.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
author: Erik Montnemery
|
||||
authorURL: https://github.com/emontnemery
|
||||
title: "Changes to the icon translations schema"
|
||||
---
|
||||
|
||||
The icon translations schema has been adjusted to allow assigning icons for [sections in services](/docs/dev_101_services/#grouping-of-service-action-fields).
|
||||
Icons for services should now be provided according to a more explicit schema, which allows specifying icons for sections.
|
||||
|
||||
This allows specifying service icons like this:
|
||||
```json
|
||||
"services": {
|
||||
"test_service_1": {
|
||||
"service": "mdi:flask",
|
||||
"sections": {
|
||||
"section_1": "mdi:test-tube"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The old format is supported during a deprecation period of one year, to give time for custom integrations to migrate to the new schema:
|
||||
```json
|
||||
"services": {
|
||||
"test_service_1": "mdi:flask"
|
||||
}
|
||||
```
|
||||
|
||||
See [core PR #124656](https://github.com/home-assistant/core/pull/124656) for implementation details.
|
||||
|
||||
### Impact on custom cards
|
||||
|
||||
Icons data sent to the frontend will always be according to the new format, custom cards displaying service icons need to be adjusted.
|
Loading…
x
Reference in New Issue
Block a user