mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Remove Configuration CC as choice in zwave_js value device condition (#54962)
This commit is contained in:
parent
8796eaec81
commit
1075a65bbd
@ -193,6 +193,8 @@ async def async_get_condition_capabilities(
|
|||||||
return {"extra_fields": vol.Schema({vol.Required(ATTR_VALUE): value_schema})}
|
return {"extra_fields": vol.Schema({vol.Required(ATTR_VALUE): value_schema})}
|
||||||
|
|
||||||
if config[CONF_TYPE] == VALUE_TYPE:
|
if config[CONF_TYPE] == VALUE_TYPE:
|
||||||
|
# Only show command classes on this node and exclude Configuration CC since it
|
||||||
|
# is already covered
|
||||||
return {
|
return {
|
||||||
"extra_fields": vol.Schema(
|
"extra_fields": vol.Schema(
|
||||||
{
|
{
|
||||||
@ -200,6 +202,7 @@ async def async_get_condition_capabilities(
|
|||||||
{
|
{
|
||||||
CommandClass(cc.id).value: CommandClass(cc.id).name
|
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]
|
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,
|
vol.Required(ATTR_PROPERTY): cv.string,
|
||||||
|
@ -433,7 +433,6 @@ async def test_get_condition_capabilities_value(
|
|||||||
cc_options = [
|
cc_options = [
|
||||||
(133, "ASSOCIATION"),
|
(133, "ASSOCIATION"),
|
||||||
(128, "BATTERY"),
|
(128, "BATTERY"),
|
||||||
(112, "CONFIGURATION"),
|
|
||||||
(98, "DOOR_LOCK"),
|
(98, "DOOR_LOCK"),
|
||||||
(122, "FIRMWARE_UPDATE_MD"),
|
(122, "FIRMWARE_UPDATE_MD"),
|
||||||
(114, "MANUFACTURER_SPECIFIC"),
|
(114, "MANUFACTURER_SPECIFIC"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user