mirror of
https://github.com/home-assistant/core.git
synced 2026-04-18 07:56:03 +01:00
Make field description optional for non config flows (#166892)
This commit is contained in:
committed by
Bram Kragten
parent
fc6efac559
commit
92375078c0
@@ -402,7 +402,7 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
|
|||||||
cv.schema_with_slug_keys(
|
cv.schema_with_slug_keys(
|
||||||
{
|
{
|
||||||
vol.Required("name"): str,
|
vol.Required("name"): str,
|
||||||
vol.Required(
|
vol.Optional(
|
||||||
"description"
|
"description"
|
||||||
): translation_value_validator,
|
): translation_value_validator,
|
||||||
},
|
},
|
||||||
@@ -508,7 +508,7 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
|
|||||||
vol.Optional("fields"): cv.schema_with_slug_keys(
|
vol.Optional("fields"): cv.schema_with_slug_keys(
|
||||||
{
|
{
|
||||||
vol.Required("name"): str,
|
vol.Required("name"): str,
|
||||||
vol.Required("description"): translation_value_validator,
|
vol.Optional("description"): translation_value_validator,
|
||||||
vol.Optional("example"): translation_value_validator,
|
vol.Optional("example"): translation_value_validator,
|
||||||
},
|
},
|
||||||
slug_validator=translation_key_validator,
|
slug_validator=translation_key_validator,
|
||||||
@@ -530,7 +530,7 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
|
|||||||
vol.Optional("fields"): cv.schema_with_slug_keys(
|
vol.Optional("fields"): cv.schema_with_slug_keys(
|
||||||
{
|
{
|
||||||
vol.Required("name"): str,
|
vol.Required("name"): str,
|
||||||
vol.Required("description"): translation_value_validator,
|
vol.Optional("description"): translation_value_validator,
|
||||||
vol.Optional("example"): translation_value_validator,
|
vol.Optional("example"): translation_value_validator,
|
||||||
},
|
},
|
||||||
slug_validator=translation_key_validator,
|
slug_validator=translation_key_validator,
|
||||||
@@ -545,7 +545,7 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
|
|||||||
vol.Optional("fields"): cv.schema_with_slug_keys(
|
vol.Optional("fields"): cv.schema_with_slug_keys(
|
||||||
{
|
{
|
||||||
vol.Required("name"): str,
|
vol.Required("name"): str,
|
||||||
vol.Required("description"): translation_value_validator,
|
vol.Optional("description"): translation_value_validator,
|
||||||
vol.Optional("example"): translation_value_validator,
|
vol.Optional("example"): translation_value_validator,
|
||||||
},
|
},
|
||||||
slug_validator=translation_key_validator,
|
slug_validator=translation_key_validator,
|
||||||
|
|||||||
@@ -166,6 +166,9 @@ SAMPLE_STRINGS = {
|
|||||||
"name": "Field one",
|
"name": "Field one",
|
||||||
"description": "Description of field one",
|
"description": "Description of field one",
|
||||||
},
|
},
|
||||||
|
"field_two": {
|
||||||
|
"name": "Field two",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"field_old": {
|
"field_old": {
|
||||||
@@ -346,7 +349,6 @@ SAMPLE_STRINGS = {
|
|||||||
},
|
},
|
||||||
"target": {
|
"target": {
|
||||||
"name": "Target",
|
"name": "Target",
|
||||||
"description": "The target device",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"sections": {
|
"sections": {
|
||||||
@@ -371,6 +373,9 @@ SAMPLE_STRINGS = {
|
|||||||
"description": "The entity to check",
|
"description": "The entity to check",
|
||||||
"example": "light.living_room",
|
"example": "light.living_room",
|
||||||
},
|
},
|
||||||
|
"some_option": {
|
||||||
|
"name": "Some option",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -384,6 +389,9 @@ SAMPLE_STRINGS = {
|
|||||||
"description": "The entity to monitor",
|
"description": "The entity to monitor",
|
||||||
"example": "light.living_room",
|
"example": "light.living_room",
|
||||||
},
|
},
|
||||||
|
"some_option": {
|
||||||
|
"name": "Some option",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user