mirror of
https://github.com/home-assistant/core.git
synced 2026-05-08 09:38:58 +01:00
Improve descriptions of schlage actions (#164299)
This commit is contained in:
@@ -74,31 +74,31 @@
|
|||||||
},
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"add_code": {
|
"add_code": {
|
||||||
"description": "Add a PIN code to a lock.",
|
"description": "Adds a PIN code to a lock.",
|
||||||
"fields": {
|
"fields": {
|
||||||
"code": {
|
"code": {
|
||||||
"description": "The PIN code to add. Must be unique to lock and be between 4 and 8 digits long.",
|
"description": "The PIN code to add. Must be unique to the lock and be between 4 and 8 digits long.",
|
||||||
"name": "PIN code"
|
"name": "PIN code"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"description": "Name for PIN code. Must be case insensitively unique to lock.",
|
"description": "Name for PIN code. Must be case insensitively unique to the lock.",
|
||||||
"name": "PIN name"
|
"name": "PIN name"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "Add PIN code"
|
"name": "Add PIN code"
|
||||||
},
|
},
|
||||||
"delete_code": {
|
"delete_code": {
|
||||||
"description": "Delete a PIN code from a lock.",
|
"description": "Deletes a PIN code from a lock.",
|
||||||
"fields": {
|
"fields": {
|
||||||
"name": {
|
"name": {
|
||||||
"description": "Name of PIN code to delete.",
|
"description": "Name of PIN code to delete.",
|
||||||
"name": "PIN name"
|
"name": "[%key:component::schlage::services::add_code::fields::name::name%]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"name": "Delete PIN code"
|
"name": "Delete PIN code"
|
||||||
},
|
},
|
||||||
"get_codes": {
|
"get_codes": {
|
||||||
"description": "Retrieve all PIN codes from the lock.",
|
"description": "Retrieves all PIN codes from a lock.",
|
||||||
"name": "Get PIN codes"
|
"name": "Get PIN codes"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ async def test_add_code_service_duplicate_name(
|
|||||||
|
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
ServiceValidationError,
|
ServiceValidationError,
|
||||||
match='A PIN code with the name "test_user" already exists on the lock.',
|
match='A PIN code with the name "test_user" already exists on the lock',
|
||||||
) as exc_info:
|
) as exc_info:
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
@@ -206,7 +206,7 @@ async def test_add_code_service_duplicate_code(
|
|||||||
|
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
ServiceValidationError,
|
ServiceValidationError,
|
||||||
match="A PIN code with this value already exists on the lock.",
|
match="A PIN code with this value already exists on the lock",
|
||||||
) as exc_info:
|
) as exc_info:
|
||||||
await hass.services.async_call(
|
await hass.services.async_call(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
|
|||||||
Reference in New Issue
Block a user