mirror of
https://github.com/home-assistant/core.git
synced 2025-12-27 14:31:13 +00:00
Add support for translating custom attribute state (#83386)
* Add support for translating custom attribute state * Address review comment * Rename attribute to state_attributes, allow naming attributes
This commit is contained in:
@@ -269,9 +269,15 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
|
||||
},
|
||||
vol.Optional("entity"): {
|
||||
str: {
|
||||
str: vol.Schema(
|
||||
{vol.Optional("state"): {str: cv.string_with_no_html}}
|
||||
)
|
||||
str: {
|
||||
vol.Optional("state_attributes"): {
|
||||
str: {
|
||||
vol.Optional("name"): cv.string_with_no_html,
|
||||
vol.Optional("state"): {str: cv.string_with_no_html},
|
||||
}
|
||||
},
|
||||
vol.Optional("state"): {str: cv.string_with_no_html},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user