Remove Configuration CC as choice in zwave_js value device condition (#54962)

This commit is contained in:
Raman Gupta 2021-08-21 00:09:27 -04:00 committed by GitHub
parent 8796eaec81
commit 1075a65bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -193,6 +193,8 @@ async def async_get_condition_capabilities(
return {"extra_fields": vol.Schema({vol.Required(ATTR_VALUE): value_schema})}
if config[CONF_TYPE] == VALUE_TYPE:
# Only show command classes on this node and exclude Configuration CC since it
# is already covered
return {
"extra_fields": vol.Schema(
{
@ -200,6 +202,7 @@ async def async_get_condition_capabilities(
{
CommandClass(cc.id).value: CommandClass(cc.id).name
for cc in sorted(node.command_classes, key=lambda cc: cc.name) # type: ignore[no-any-return]
if cc.id != CommandClass.CONFIGURATION
}
),
vol.Required(ATTR_PROPERTY): cv.string,

View File

@ -433,7 +433,6 @@ async def test_get_condition_capabilities_value(
cc_options = [
(133, "ASSOCIATION"),
(128, "BATTERY"),
(112, "CONFIGURATION"),
(98, "DOOR_LOCK"),
(122, "FIRMWARE_UPDATE_MD"),
(114, "MANUFACTURER_SPECIFIC"),