Support bitmask as a value (#51892)
* Support bitmask as a value * Fix value schema and add tests * fix test * revert change to value schema
This commit is contained in:
parent
31db3fcb23
commit
a250343c55
4 changed files with 228 additions and 16 deletions
|
@ -51,6 +51,7 @@ from .const import (
|
|||
EVENT_DEVICE_ADDED_TO_REGISTRY,
|
||||
)
|
||||
from .helpers import async_enable_statistics, update_data_collection_preference
|
||||
from .services import BITMASK_SCHEMA
|
||||
|
||||
# general API constants
|
||||
ID = "id"
|
||||
|
@ -925,7 +926,7 @@ async def websocket_refresh_node_cc_values(
|
|||
vol.Required(NODE_ID): int,
|
||||
vol.Required(PROPERTY): int,
|
||||
vol.Optional(PROPERTY_KEY): int,
|
||||
vol.Required(VALUE): int,
|
||||
vol.Required(VALUE): vol.Any(int, BITMASK_SCHEMA),
|
||||
}
|
||||
)
|
||||
@websocket_api.async_response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue