mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Allow translating device names (#110711)
* Allow translating device names * Don't keep a reference to translations in config entry * Update kitchen_sink tests * Add tests
This commit is contained in:
@@ -311,6 +311,12 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
|
||||
},
|
||||
slug_validator=vol.Any("_", cv.slug),
|
||||
),
|
||||
vol.Optional("device"): cv.schema_with_slug_keys(
|
||||
{
|
||||
vol.Optional("name"): translation_value_validator,
|
||||
},
|
||||
slug_validator=translation_key_validator,
|
||||
),
|
||||
vol.Optional("entity"): cv.schema_with_slug_keys(
|
||||
cv.schema_with_slug_keys(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user