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:
parent
fc94569a0d
commit
255f35b979
5 changed files with 83 additions and 6 deletions
|
@ -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},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue