Command arguments for issue_zigbee_cluster_commands. (#28885)

This commit is contained in:
Alexei Chetroi 2019-11-20 08:34:06 -05:00 committed by David F. Mulcahey
parent b267d54db3
commit 4ba2bd232c
3 changed files with 5 additions and 6 deletions

View file

@ -141,7 +141,7 @@ SERVICE_SCHEMAS = {
vol.Optional(ATTR_CLUSTER_TYPE, default=CLUSTER_TYPE_IN): cv.string, vol.Optional(ATTR_CLUSTER_TYPE, default=CLUSTER_TYPE_IN): cv.string,
vol.Required(ATTR_COMMAND): cv.positive_int, vol.Required(ATTR_COMMAND): cv.positive_int,
vol.Required(ATTR_COMMAND_TYPE): cv.string, vol.Required(ATTR_COMMAND_TYPE): cv.string,
vol.Optional(ATTR_ARGS, default=""): cv.string, vol.Optional(ATTR_ARGS, default=[]): cv.ensure_list,
vol.Optional(ATTR_MANUFACTURER): cv.positive_int, vol.Optional(ATTR_MANUFACTURER): cv.positive_int,
} }
), ),
@ -649,7 +649,7 @@ def async_load_api(hass):
cluster_id, cluster_id,
command, command,
command_type, command_type,
args, *args,
cluster_type=cluster_type, cluster_type=cluster_type,
manufacturer=manufacturer, manufacturer=manufacturer,
) )

View file

@ -479,7 +479,7 @@ class ZHADevice(LogMixin):
cluster_id, cluster_id,
command, command,
command_type, command_type,
args, *args,
cluster_type=CLUSTER_TYPE_IN, cluster_type=CLUSTER_TYPE_IN,
manufacturer=None, manufacturer=None,
): ):
@ -487,7 +487,6 @@ class ZHADevice(LogMixin):
cluster = self.async_get_cluster(endpoint_id, cluster_id, cluster_type) cluster = self.async_get_cluster(endpoint_id, cluster_id, cluster_type)
if cluster is None: if cluster is None:
return None return None
response = None
if command_type == CLUSTER_COMMAND_SERVER: if command_type == CLUSTER_COMMAND_SERVER:
response = await cluster.command( response = await cluster.command(
command, *args, manufacturer=manufacturer, expect_reply=True command, *args, manufacturer=manufacturer, expect_reply=True

View file

@ -78,7 +78,7 @@ issue_zigbee_cluster_command:
example: "server" example: "server"
args: args:
description: args to pass to the command description: args to pass to the command
example: {} example: '[arg1, arg2, argN]'
manufacturer: manufacturer:
description: manufacturer code description: manufacturer code
example: 0x00FC example: 0x00FC
@ -98,7 +98,7 @@ issue_zigbee_group_command:
example: 0 example: 0
args: args:
description: args to pass to the command description: args to pass to the command
example: {} example: '[arg1, arg2, argN]'
manufacturer: manufacturer:
description: manufacturer code description: manufacturer code
example: 0x00FC example: 0x00FC