address outstanding items (#2454)

This commit is contained in:
David F. Mulcahey 2019-01-12 17:38:26 -05:00 committed by Paulus Schoutsen
parent d34dada9d8
commit 963bdcc53c

View File

@ -64,11 +64,10 @@ export const readAttributeValue = (
hass: HomeAssistant, hass: HomeAssistant,
data: ReadAttributeServiceData data: ReadAttributeServiceData
): Promise<string> => { ): Promise<string> => {
const serviceData = { return hass.callWS({
...data,
type: "zha/entities/clusters/attributes/value", type: "zha/entities/clusters/attributes/value",
}; });
Object.assign(serviceData, data);
return hass.callWS(serviceData);
}; };
export const fetchCommandsForCluster = ( export const fetchCommandsForCluster = (
@ -78,7 +77,7 @@ export const fetchCommandsForCluster = (
clusterId: number, clusterId: number,
clusterType: string clusterType: string
): Promise<Command[]> => ): Promise<Command[]> =>
hass!.callWS({ hass.callWS({
type: "zha/entities/clusters/commands", type: "zha/entities/clusters/commands",
entity_id: entityId, entity_id: entityId,
ieee: ieeeAddress, ieee: ieeeAddress,