message: fix: better logging and remove associations only if present
diff: @@ -376,10 +376,7 @@ function onNodeDead (zwaveNode, oldStatus) {
  function onNodeValueAdded (zwaveNode, args) {
  debug(
  - `Node ${zwaveNode.id}: value added: ${getValueID(args)} => ${String(
  - args.newValue
  - )}`
  - )
  + `Node ${zwaveNode.id}: value added: ${getValueID(args)} =>`, args.newValue)
  this.emit(
  'event',
  @@ -393,9 +390,7 @@ function onNodeValueAdded (zwaveNode, args) {
  function onNodeValueUpdated (zwaveNode, args) {
  updateValue.call(this, zwaveNode, args)
  debug(
  - `Node ${zwaveNode.id}: value updated: ${getValueID(args)} ${
  - args.prevValue
  - } => ${String(args.newValue)}`
  + `Node ${zwaveNode.id}: value updated: ${getValueID(args)}`, args.prevValue, '=>', args.newValue
  )
  this.emit(
  @@ -1133,8 +1128,7 @@ ZwaveClient.prototype.removeAssociations = async function (
  if (zwaveNode) {
  try {
  debug(
  - `Assocaitions: Removing associations from Node ${nodeId} Group ${groupId}: ${JSON.stringify(associations)}`
  - )
  + `Assocaitions: Removing associations from Node ${nodeId} Group ${groupId}:`, associations)
  await this.driver.controller.removeAssociations(
  nodeId,
  groupId,
  @@ -1163,9 +1157,11 @@ ZwaveClient.prototype.removeAllAssociations = async function (nodeId) {
  const associationsGroups = await this.driver.controller.getAssociations(nodeId)
  for (const [groupId, associations] of associationsGroups) {
  + if (associations.length > 0) {
  await this.driver.controller.removeAssociations(nodeId, groupId, associations)
  debug(`Assocaitions: Removed ${associations.length} associations from Node ${nodeId} group ${groupId}`)
  }
  + }
  } catch (error) {
  debug(
  `Error while removing all associations from ${nodeId}: ${error.message}`
  