zigbee-herdsman-converters 14.0.571 → 14.0.574

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,106 +38,109 @@ const converters = {
38
38
  convert: (model, msg, publish, options, meta) => {
39
39
  const result = {};
40
40
  if (msg.data.hasOwnProperty('localTemp')) {
41
- result[postfixWithEndpointName('local_temperature', msg, model)] = precisionRound(msg.data['localTemp'], 2) / 100;
41
+ result[postfixWithEndpointName('local_temperature', msg, model, meta)] = precisionRound(msg.data['localTemp'], 2) / 100;
42
42
  }
43
43
  if (msg.data.hasOwnProperty('localTemperatureCalibration')) {
44
- result[postfixWithEndpointName('local_temperature_calibration', msg, model)] =
44
+ result[postfixWithEndpointName('local_temperature_calibration', msg, model, meta)] =
45
45
  precisionRound(msg.data['localTemperatureCalibration'], 2) / 10;
46
46
  }
47
47
  if (msg.data.hasOwnProperty('outdoorTemp')) {
48
- result[postfixWithEndpointName('outdoor_temperature', msg, model)] = precisionRound(msg.data['outdoorTemp'], 2) / 100;
48
+ result[postfixWithEndpointName('outdoor_temperature', msg, model, meta)] = precisionRound(msg.data['outdoorTemp'], 2) / 100;
49
49
  }
50
50
  if (msg.data.hasOwnProperty('occupancy')) {
51
- result[postfixWithEndpointName('occupancy', msg, model)] = (msg.data.occupancy % 2) > 0;
51
+ result[postfixWithEndpointName('occupancy', msg, model, meta)] = (msg.data.occupancy % 2) > 0;
52
52
  }
53
53
  if (msg.data.hasOwnProperty('occupiedHeatingSetpoint')) {
54
54
  let value = precisionRound(msg.data['occupiedHeatingSetpoint'], 2) / 100;
55
55
  // Stelpro will return -325.65 when set to off, value is not realistic anyway
56
56
  value = value < -250 ? 0 : value;
57
- result[postfixWithEndpointName('occupied_heating_setpoint', msg, model)] = value;
57
+ result[postfixWithEndpointName('occupied_heating_setpoint', msg, model, meta)] = value;
58
58
  }
59
59
  if (msg.data.hasOwnProperty('unoccupiedHeatingSetpoint')) {
60
- result[postfixWithEndpointName('unoccupied_heating_setpoint', msg, model)] =
60
+ result[postfixWithEndpointName('unoccupied_heating_setpoint', msg, model, meta)] =
61
61
  precisionRound(msg.data['unoccupiedHeatingSetpoint'], 2) / 100;
62
62
  }
63
63
  if (msg.data.hasOwnProperty('occupiedCoolingSetpoint')) {
64
- result[postfixWithEndpointName('occupied_cooling_setpoint', msg, model)] =
64
+ result[postfixWithEndpointName('occupied_cooling_setpoint', msg, model, meta)] =
65
65
  precisionRound(msg.data['occupiedCoolingSetpoint'], 2) / 100;
66
66
  }
67
67
  if (msg.data.hasOwnProperty('unoccupiedCoolingSetpoint')) {
68
- result[postfixWithEndpointName('unoccupied_cooling_setpoint', msg, model)] =
68
+ result[postfixWithEndpointName('unoccupied_cooling_setpoint', msg, model, meta)] =
69
69
  precisionRound(msg.data['unoccupiedCoolingSetpoint'], 2) / 100;
70
70
  }
71
71
  if (msg.data.hasOwnProperty('setpointChangeAmount')) {
72
- result[postfixWithEndpointName('setpoint_change_amount', msg, model)] = msg.data['setpointChangeAmount'] / 100;
72
+ result[postfixWithEndpointName('setpoint_change_amount', msg, model, meta)] = msg.data['setpointChangeAmount'] / 100;
73
73
  }
74
74
  if (msg.data.hasOwnProperty('setpointChangeSource')) {
75
75
  const lookup = {0: 'manual', 1: 'schedule', 2: 'externally'};
76
- result[postfixWithEndpointName('setpoint_change_source', msg, model)] = lookup[msg.data['setpointChangeSource']];
76
+ result[postfixWithEndpointName('setpoint_change_source', msg, model, meta)] = lookup[msg.data['setpointChangeSource']];
77
77
  }
78
78
  if (msg.data.hasOwnProperty('setpointChangeSourceTimeStamp')) {
79
79
  const date = new Date(2000, 0, 1);
80
80
  date.setSeconds(msg.data['setpointChangeSourceTimeStamp']);
81
81
  const value = toLocalISOString(date);
82
- result[postfixWithEndpointName('setpoint_change_source_timestamp', msg, model)] = value;
82
+ result[postfixWithEndpointName('setpoint_change_source_timestamp', msg, model, meta)] = value;
83
83
  }
84
84
  if (msg.data.hasOwnProperty('remoteSensing')) {
85
85
  const value = msg.data['remoteSensing'];
86
- result[postfixWithEndpointName('remote_sensing', msg, model)] = {
86
+ result[postfixWithEndpointName('remote_sensing', msg, model, meta)] = {
87
87
  local_temperature: ((value & 1) > 0) ? 'remotely' : 'internally',
88
88
  outdoor_temperature: ((value & 1<<1) > 0) ? 'remotely' : 'internally',
89
89
  occupancy: ((value & 1<<2) > 0) ? 'remotely' : 'internally',
90
90
  };
91
91
  }
92
92
  if (msg.data.hasOwnProperty('ctrlSeqeOfOper')) {
93
- result[postfixWithEndpointName('control_sequence_of_operation', msg, model)] =
93
+ result[postfixWithEndpointName('control_sequence_of_operation', msg, model, meta)] =
94
94
  constants.thermostatControlSequenceOfOperations[msg.data['ctrlSeqeOfOper']];
95
95
  }
96
96
  if (msg.data.hasOwnProperty('programingOperMode')) {
97
- result[postfixWithEndpointName('programming_operation_mode', msg, model)] =
97
+ result[postfixWithEndpointName('programming_operation_mode', msg, model, meta)] =
98
98
  constants.thermostatProgrammingOperationModes[msg.data['programingOperMode']];
99
99
  }
100
100
  if (msg.data.hasOwnProperty('systemMode')) {
101
- result[postfixWithEndpointName('system_mode', msg, model)] = constants.thermostatSystemModes[msg.data['systemMode']];
101
+ result[postfixWithEndpointName('system_mode', msg, model, meta)] = constants.thermostatSystemModes[msg.data['systemMode']];
102
102
  }
103
103
  if (msg.data.hasOwnProperty('runningMode')) {
104
- result[postfixWithEndpointName('running_mode', msg, model)] = constants.thermostatRunningMode[msg.data['runningMode']];
104
+ result[postfixWithEndpointName('running_mode', msg, model, meta)] =
105
+ constants.thermostatRunningMode[msg.data['runningMode']];
105
106
  }
106
107
  if (msg.data.hasOwnProperty('runningState')) {
107
- result[postfixWithEndpointName('running_state', msg, model)] = constants.thermostatRunningStates[msg.data['runningState']];
108
+ result[postfixWithEndpointName('running_state', msg, model, meta)] =
109
+ constants.thermostatRunningStates[msg.data['runningState']];
108
110
  }
109
111
  if (msg.data.hasOwnProperty('pIHeatingDemand')) {
110
- result[postfixWithEndpointName('pi_heating_demand', msg, model)] =
112
+ result[postfixWithEndpointName('pi_heating_demand', msg, model, meta)] =
111
113
  mapNumberRange(msg.data['pIHeatingDemand'], 0, 255, 0, 100);
112
114
  }
113
115
  if (msg.data.hasOwnProperty('tempSetpointHold')) {
114
- result[postfixWithEndpointName('temperature_setpoint_hold', msg, model)] = msg.data['tempSetpointHold'] == 1;
116
+ result[postfixWithEndpointName('temperature_setpoint_hold', msg, model, meta)] = msg.data['tempSetpointHold'] == 1;
115
117
  }
116
118
  if (msg.data.hasOwnProperty('tempSetpointHoldDuration')) {
117
- result[postfixWithEndpointName('temperature_setpoint_hold_duration', msg, model)] = msg.data['tempSetpointHoldDuration'];
119
+ result[postfixWithEndpointName('temperature_setpoint_hold_duration', msg, model, meta)] =
120
+ msg.data['tempSetpointHoldDuration'];
118
121
  }
119
122
  if (msg.data.hasOwnProperty('minHeatSetpointLimit')) {
120
123
  let value = precisionRound(msg.data['minHeatSetpointLimit'], 2) / 100;
121
124
  value = value < -250 ? 0 : value;
122
- result[postfixWithEndpointName('min_heat_setpoint_limit', msg, model)] = value;
125
+ result[postfixWithEndpointName('min_heat_setpoint_limit', msg, model, meta)] = value;
123
126
  }
124
127
  if (msg.data.hasOwnProperty('maxHeatSetpointLimit')) {
125
128
  let value = precisionRound(msg.data['maxHeatSetpointLimit'], 2) / 100;
126
129
  value = value < -250 ? 0 : value;
127
- result[postfixWithEndpointName('max_heat_setpoint_limit', msg, model)] = value;
130
+ result[postfixWithEndpointName('max_heat_setpoint_limit', msg, model, meta)] = value;
128
131
  }
129
132
  if (msg.data.hasOwnProperty('absMinHeatSetpointLimit')) {
130
133
  let value = precisionRound(msg.data['absMinHeatSetpointLimit'], 2) / 100;
131
134
  value = value < -250 ? 0 : value;
132
- result[postfixWithEndpointName('abs_min_heat_setpoint_limit', msg, model)] = value;
135
+ result[postfixWithEndpointName('abs_min_heat_setpoint_limit', msg, model, meta)] = value;
133
136
  }
134
137
  if (msg.data.hasOwnProperty('absMaxHeatSetpointLimit')) {
135
138
  let value = precisionRound(msg.data['absMaxHeatSetpointLimit'], 2) / 100;
136
139
  value = value < -250 ? 0 : value;
137
- result[postfixWithEndpointName('abs_max_heat_setpoint_limit', msg, model)] = value;
140
+ result[postfixWithEndpointName('abs_max_heat_setpoint_limit', msg, model, meta)] = value;
138
141
  }
139
142
  if (msg.data.hasOwnProperty('acLouverPosition')) {
140
- result[postfixWithEndpointName('ac_louver_position', msg, model)] =
143
+ result[postfixWithEndpointName('ac_louver_position', msg, model, meta)] =
141
144
  constants.thermostatAcLouverPositions[msg.data['acLouverPosition']];
142
145
  }
143
146
  return result;
@@ -166,7 +169,7 @@ const converters = {
166
169
  transitions.push(entry);
167
170
  }
168
171
 
169
- return {[postfixWithEndpointName('weekly_schedule', msg, model)]: {days, transitions}};
172
+ return {[postfixWithEndpointName('weekly_schedule', msg, model, meta)]: {days, transitions}};
170
173
  },
171
174
  },
172
175
  hvac_user_interface: {
@@ -350,7 +353,7 @@ const converters = {
350
353
  convert: (model, msg, publish, options, meta) => {
351
354
  if (msg.data.hasOwnProperty('measuredValue')) {
352
355
  const temperature = parseFloat(msg.data['measuredValue']) / 100.0;
353
- const property = postfixWithEndpointName('temperature', msg, model);
356
+ const property = postfixWithEndpointName('temperature', msg, model, meta);
354
357
  return {[property]: calibrateAndPrecisionRoundOptions(temperature, options, 'temperature')};
355
358
  }
356
359
  },
@@ -487,7 +490,7 @@ const converters = {
487
490
  type: ['attributeReport', 'readResponse'],
488
491
  convert: (model, msg, publish, options, meta) => {
489
492
  if (msg.data.hasOwnProperty('currentLevel')) {
490
- const property = postfixWithEndpointName('brightness', msg, model);
493
+ const property = postfixWithEndpointName('brightness', msg, model, meta);
491
494
  return {[property]: msg.data['currentLevel']};
492
495
  }
493
496
  },
@@ -709,12 +712,12 @@ const converters = {
709
712
  convert: (model, msg, publish, options, meta) => {
710
713
  const result = {};
711
714
  if (msg.data.hasOwnProperty('develcoPulseConfiguration')) {
712
- result[postfixWithEndpointName('pulse_configuration', msg, model)] =
715
+ result[postfixWithEndpointName('pulse_configuration', msg, model, meta)] =
713
716
  msg.data['develcoPulseConfiguration'];
714
717
  }
715
718
 
716
719
  if (msg.data.hasOwnProperty('develcoInterfaceMode')) {
717
- result[postfixWithEndpointName('interface_mode', msg, model)] =
720
+ result[postfixWithEndpointName('interface_mode', msg, model, meta)] =
718
721
  constants.develcoInterfaceMode.hasOwnProperty(msg.data['develcoInterfaceMode']) ?
719
722
  constants.develcoInterfaceMode[msg.data['develcoInterfaceMode']] :
720
723
  msg.data['develcoInterfaceMode'];
@@ -761,7 +764,7 @@ const converters = {
761
764
  for (const entry of lookup) {
762
765
  if (msg.data.hasOwnProperty(entry.key)) {
763
766
  const factor = getFactor(entry.factor);
764
- const property = postfixWithEndpointName(entry.name, msg, model);
767
+ const property = postfixWithEndpointName(entry.name, msg, model, meta);
765
768
  const value = msg.data[entry.key] * factor;
766
769
  payload[property] = calibrateAndPrecisionRoundOptions(value, options, entry.name);
767
770
  }
@@ -777,7 +780,7 @@ const converters = {
777
780
  type: ['attributeReport', 'readResponse'],
778
781
  convert: (model, msg, publish, options, meta) => {
779
782
  if (msg.data.hasOwnProperty('onOff')) {
780
- const property = postfixWithEndpointName('state', msg, model);
783
+ const property = postfixWithEndpointName('state', msg, model, meta);
781
784
  return {[property]: msg.data['onOff'] === 1 ? 'ON' : 'OFF'};
782
785
  }
783
786
  },
@@ -790,7 +793,7 @@ const converters = {
790
793
  // prevent that multiple messages get send.
791
794
  // https://github.com/Koenkk/zigbee2mqtt/issues/3687
792
795
  if (msg.data.hasOwnProperty('onOff') && !hasAlreadyProcessedMessage(msg)) {
793
- const property = postfixWithEndpointName('state', msg, model);
796
+ const property = postfixWithEndpointName('state', msg, model, meta);
794
797
  return {[property]: msg.data['onOff'] === 1 ? 'ON' : 'OFF'};
795
798
  }
796
799
  },
@@ -801,7 +804,7 @@ const converters = {
801
804
  convert: (model, msg, publish, options, meta) => {
802
805
  const lookup = {0: 'off', 1: 'on', 2: 'toggle', 255: 'previous'};
803
806
  if (msg.data.hasOwnProperty('startUpOnOff')) {
804
- const property = postfixWithEndpointName('power_on_behavior', msg, model);
807
+ const property = postfixWithEndpointName('power_on_behavior', msg, model, meta);
805
808
  return {[property]: lookup[msg.data['startUpOnOff']]};
806
809
  }
807
810
  },
@@ -944,9 +947,9 @@ const converters = {
944
947
  type: 'commandStatusChangeNotification',
945
948
  convert: (model, msg, publish, options, meta) => {
946
949
  const zoneStatus = msg.data.zonestatus;
947
- const contactProperty = postfixWithEndpointName('contact', msg, model);
948
- const tamperProperty = postfixWithEndpointName('tamper', msg, model);
949
- const batteryLowProperty = postfixWithEndpointName('battery_low', msg, model);
950
+ const contactProperty = postfixWithEndpointName('contact', msg, model, meta);
951
+ const tamperProperty = postfixWithEndpointName('tamper', msg, model, meta);
952
+ const batteryLowProperty = postfixWithEndpointName('battery_low', msg, model, meta);
950
953
 
951
954
  return {
952
955
  [contactProperty]: !((zoneStatus & 1) > 0),
@@ -1092,7 +1095,7 @@ const converters = {
1092
1095
  type: 'commandStore',
1093
1096
  convert: (model, msg, publish, options, meta) => {
1094
1097
  if (utils.hasAlreadyProcessedMessage(msg)) return;
1095
- const payload = {action: utils.postfixWithEndpointName(`store_${msg.data.sceneid}`, msg, model)};
1098
+ const payload = {action: utils.postfixWithEndpointName(`store_${msg.data.sceneid}`, msg, model, meta)};
1096
1099
  utils.addActionGroup(payload, msg, model);
1097
1100
  return payload;
1098
1101
  },
@@ -1102,7 +1105,7 @@ const converters = {
1102
1105
  type: 'commandRecall',
1103
1106
  convert: (model, msg, publish, options, meta) => {
1104
1107
  if (hasAlreadyProcessedMessage(msg)) return;
1105
- const payload = {action: postfixWithEndpointName(`recall_${msg.data.sceneid}`, msg, model)};
1108
+ const payload = {action: postfixWithEndpointName(`recall_${msg.data.sceneid}`, msg, model, meta)};
1106
1109
  addActionGroup(payload, msg, model);
1107
1110
  return payload;
1108
1111
  },
@@ -1112,7 +1115,7 @@ const converters = {
1112
1115
  type: 'commandPanic',
1113
1116
  convert: (model, msg, publish, options, meta) => {
1114
1117
  if (hasAlreadyProcessedMessage(msg)) return;
1115
- const payload = {action: postfixWithEndpointName(`panic`, msg, model)};
1118
+ const payload = {action: postfixWithEndpointName(`panic`, msg, model, meta)};
1116
1119
  addActionGroup(payload, msg, model);
1117
1120
  return payload;
1118
1121
  },
@@ -1123,7 +1126,7 @@ const converters = {
1123
1126
  convert: (model, msg, publish, options, meta) => {
1124
1127
  if (hasAlreadyProcessedMessage(msg)) return;
1125
1128
  const payload = {
1126
- action: postfixWithEndpointName(constants.armMode[msg.data['armmode']], msg, model),
1129
+ action: postfixWithEndpointName(constants.armMode[msg.data['armmode']], msg, model, meta),
1127
1130
  action_code: msg.data.code,
1128
1131
  action_zone: msg.data.zoneid,
1129
1132
  };
@@ -1146,7 +1149,7 @@ const converters = {
1146
1149
  type: 'commandStop',
1147
1150
  convert: (model, msg, publish, options, meta) => {
1148
1151
  if (hasAlreadyProcessedMessage(msg)) return;
1149
- const payload = {action: postfixWithEndpointName('stop', msg, model)};
1152
+ const payload = {action: postfixWithEndpointName('stop', msg, model, meta)};
1150
1153
  addActionGroup(payload, msg, model);
1151
1154
  return payload;
1152
1155
  },
@@ -1156,7 +1159,7 @@ const converters = {
1156
1159
  type: 'commandUpOpen',
1157
1160
  convert: (model, msg, publish, options, meta) => {
1158
1161
  if (hasAlreadyProcessedMessage(msg)) return;
1159
- const payload = {action: postfixWithEndpointName('open', msg, model)};
1162
+ const payload = {action: postfixWithEndpointName('open', msg, model, meta)};
1160
1163
  addActionGroup(payload, msg, model);
1161
1164
  return payload;
1162
1165
  },
@@ -1166,7 +1169,7 @@ const converters = {
1166
1169
  type: 'commandDownClose',
1167
1170
  convert: (model, msg, publish, options, meta) => {
1168
1171
  if (hasAlreadyProcessedMessage(msg)) return;
1169
- const payload = {action: postfixWithEndpointName('close', msg, model)};
1172
+ const payload = {action: postfixWithEndpointName('close', msg, model, meta)};
1170
1173
  addActionGroup(payload, msg, model);
1171
1174
  return payload;
1172
1175
  },
@@ -1176,7 +1179,7 @@ const converters = {
1176
1179
  type: 'commandOn',
1177
1180
  convert: (model, msg, publish, options, meta) => {
1178
1181
  if (hasAlreadyProcessedMessage(msg)) return;
1179
- const payload = {action: postfixWithEndpointName('on', msg, model)};
1182
+ const payload = {action: postfixWithEndpointName('on', msg, model, meta)};
1180
1183
  addActionGroup(payload, msg, model);
1181
1184
  return payload;
1182
1185
  },
@@ -1186,7 +1189,7 @@ const converters = {
1186
1189
  type: 'commandOff',
1187
1190
  convert: (model, msg, publish, options, meta) => {
1188
1191
  if (hasAlreadyProcessedMessage(msg)) return;
1189
- const payload = {action: postfixWithEndpointName('off', msg, model)};
1192
+ const payload = {action: postfixWithEndpointName('off', msg, model, meta)};
1190
1193
  addActionGroup(payload, msg, model);
1191
1194
  return payload;
1192
1195
  },
@@ -1196,7 +1199,7 @@ const converters = {
1196
1199
  type: 'commandOffWithEffect',
1197
1200
  convert: (model, msg, publish, options, meta) => {
1198
1201
  if (hasAlreadyProcessedMessage(msg)) return;
1199
- const payload = {action: postfixWithEndpointName(`off`, msg, model)};
1202
+ const payload = {action: postfixWithEndpointName(`off`, msg, model, meta)};
1200
1203
  addActionGroup(payload, msg, model);
1201
1204
  return payload;
1202
1205
  },
@@ -1206,7 +1209,7 @@ const converters = {
1206
1209
  type: 'commandToggle',
1207
1210
  convert: (model, msg, publish, options, meta) => {
1208
1211
  if (hasAlreadyProcessedMessage(msg)) return;
1209
- const payload = {action: postfixWithEndpointName('toggle', msg, model)};
1212
+ const payload = {action: postfixWithEndpointName('toggle', msg, model, meta)};
1210
1213
  addActionGroup(payload, msg, model);
1211
1214
  return payload;
1212
1215
  },
@@ -1218,7 +1221,7 @@ const converters = {
1218
1221
  convert: (model, msg, publish, options, meta) => {
1219
1222
  if (hasAlreadyProcessedMessage(msg)) return;
1220
1223
  const payload = {
1221
- action: postfixWithEndpointName(`brightness_move_to_level`, msg, model),
1224
+ action: postfixWithEndpointName(`brightness_move_to_level`, msg, model, meta),
1222
1225
  action_level: msg.data.level,
1223
1226
  action_transition_time: msg.data.transtime / 100,
1224
1227
  };
@@ -1226,7 +1229,7 @@ const converters = {
1226
1229
 
1227
1230
  if (options.simulated_brightness) {
1228
1231
  globalStore.putValue(msg.endpoint, 'simulated_brightness_brightness', msg.data.level);
1229
- const property = postfixWithEndpointName('brightness', msg, model);
1232
+ const property = postfixWithEndpointName('brightness', msg, model, meta);
1230
1233
  payload[property] = msg.data.level;
1231
1234
  }
1232
1235
 
@@ -1240,7 +1243,7 @@ const converters = {
1240
1243
  convert: (model, msg, publish, options, meta) => {
1241
1244
  if (hasAlreadyProcessedMessage(msg)) return;
1242
1245
  const direction = msg.data.movemode === 1 ? 'down' : 'up';
1243
- const action = postfixWithEndpointName(`brightness_move_${direction}`, msg, model);
1246
+ const action = postfixWithEndpointName(`brightness_move_${direction}`, msg, model, meta);
1244
1247
  const payload = {action, action_rate: msg.data.rate};
1245
1248
  addActionGroup(payload, msg, model);
1246
1249
 
@@ -1258,7 +1261,7 @@ const converters = {
1258
1261
  brightness += delta;
1259
1262
  brightness = numberWithinRange(brightness, 0, 255);
1260
1263
  globalStore.putValue(msg.endpoint, 'simulated_brightness_brightness', brightness);
1261
- const property = postfixWithEndpointName('brightness', msg, model);
1264
+ const property = postfixWithEndpointName('brightness', msg, model, meta);
1262
1265
  publish({[property]: brightness});
1263
1266
  }, intervalOpts);
1264
1267
 
@@ -1277,7 +1280,7 @@ const converters = {
1277
1280
  if (hasAlreadyProcessedMessage(msg)) return;
1278
1281
  const direction = msg.data.stepmode === 1 ? 'down' : 'up';
1279
1282
  const payload = {
1280
- action: postfixWithEndpointName(`brightness_step_${direction}`, msg, model),
1283
+ action: postfixWithEndpointName(`brightness_step_${direction}`, msg, model, meta),
1281
1284
  action_step_size: msg.data.stepsize,
1282
1285
  action_transition_time: msg.data.transtime / 100,
1283
1286
  };
@@ -1289,7 +1292,7 @@ const converters = {
1289
1292
  brightness += delta;
1290
1293
  brightness = numberWithinRange(brightness, 0, 255);
1291
1294
  globalStore.putValue(msg.endpoint, 'simulated_brightness_brightness', brightness);
1292
- const property = postfixWithEndpointName('brightness', msg, model);
1295
+ const property = postfixWithEndpointName('brightness', msg, model, meta);
1293
1296
  payload[property] = brightness;
1294
1297
  }
1295
1298
 
@@ -1307,7 +1310,7 @@ const converters = {
1307
1310
  globalStore.putValue(msg.endpoint, 'simulated_brightness_timer', undefined);
1308
1311
  }
1309
1312
 
1310
- const payload = {action: postfixWithEndpointName(`brightness_stop`, msg, model)};
1313
+ const payload = {action: postfixWithEndpointName(`brightness_stop`, msg, model, meta)};
1311
1314
  addActionGroup(payload, msg, model);
1312
1315
  return payload;
1313
1316
  },
@@ -1318,7 +1321,7 @@ const converters = {
1318
1321
  convert: (model, msg, publish, options, meta) => {
1319
1322
  if (hasAlreadyProcessedMessage(msg)) return;
1320
1323
  const direction = msg.data.movemode === 1 ? 'down' : 'up';
1321
- const action = postfixWithEndpointName(`color_temperature_move_${direction}`, msg, model);
1324
+ const action = postfixWithEndpointName(`color_temperature_move_${direction}`, msg, model, meta);
1322
1325
  const payload = {action, action_rate: msg.data.rate, action_minimum: msg.data.minimum, action_maximum: msg.data.maximum};
1323
1326
  addActionGroup(payload, msg, model);
1324
1327
  return payload;
@@ -1331,7 +1334,7 @@ const converters = {
1331
1334
  if (hasAlreadyProcessedMessage(msg)) return;
1332
1335
  const direction = msg.data.stepmode === 1 ? 'up' : 'down';
1333
1336
  const payload = {
1334
- action: postfixWithEndpointName(`color_temperature_step_${direction}`, msg, model),
1337
+ action: postfixWithEndpointName(`color_temperature_step_${direction}`, msg, model, meta),
1335
1338
  action_step_size: msg.data.stepsize,
1336
1339
  };
1337
1340
 
@@ -1349,7 +1352,7 @@ const converters = {
1349
1352
  convert: (model, msg, publish, options, meta) => {
1350
1353
  if (hasAlreadyProcessedMessage(msg)) return;
1351
1354
  const payload = {
1352
- action: postfixWithEndpointName(`enhanced_move_to_hue_and_saturation`, msg, model),
1355
+ action: postfixWithEndpointName(`enhanced_move_to_hue_and_saturation`, msg, model, meta),
1353
1356
  action_enhanced_hue: msg.data.enhancehue,
1354
1357
  action_hue: mapNumberRange(msg.data.enhancehue, 0, 65535, 0, 360, 1),
1355
1358
  action_saturation: msg.data.saturation,
@@ -1367,7 +1370,7 @@ const converters = {
1367
1370
  if (hasAlreadyProcessedMessage(msg)) return;
1368
1371
  const direction = msg.data.stepmode === 1 ? 'up' : 'down';
1369
1372
  const payload = {
1370
- action: postfixWithEndpointName(`color_hue_step_${direction}`, msg, model),
1373
+ action: postfixWithEndpointName(`color_hue_step_${direction}`, msg, model, meta),
1371
1374
  action_step_size: msg.data.stepsize,
1372
1375
  action_transition_time: msg.data.transtime/100,
1373
1376
  };
@@ -1382,7 +1385,7 @@ const converters = {
1382
1385
  if (hasAlreadyProcessedMessage(msg)) return;
1383
1386
  const direction = msg.data.stepmode === 1 ? 'up' : 'down';
1384
1387
  const payload = {
1385
- action: postfixWithEndpointName(`color_saturation_step_${direction}`, msg, model),
1388
+ action: postfixWithEndpointName(`color_saturation_step_${direction}`, msg, model, meta),
1386
1389
  action_step_size: msg.data.stepsize,
1387
1390
  action_transition_time: msg.data.transtime/100,
1388
1391
  };
@@ -1403,7 +1406,7 @@ const converters = {
1403
1406
  };
1404
1407
 
1405
1408
  const payload = {
1406
- action: postfixWithEndpointName(`color_loop_set`, msg, model),
1409
+ action: postfixWithEndpointName(`color_loop_set`, msg, model, meta),
1407
1410
  action_update_flags: {
1408
1411
  action: (updateFlags & 1 << 0) > 0,
1409
1412
  direction: (updateFlags & 1 << 1) > 0,
@@ -1426,7 +1429,7 @@ const converters = {
1426
1429
  convert: (model, msg, publish, options, meta) => {
1427
1430
  if (hasAlreadyProcessedMessage(msg)) return;
1428
1431
  const payload = {
1429
- action: postfixWithEndpointName(`color_temperature_move`, msg, model),
1432
+ action: postfixWithEndpointName(`color_temperature_move`, msg, model, meta),
1430
1433
  action_color_temperature: msg.data.colortemp,
1431
1434
  action_transition_time: msg.data.transtime,
1432
1435
  };
@@ -1440,7 +1443,7 @@ const converters = {
1440
1443
  convert: (model, msg, publish, options, meta) => {
1441
1444
  if (hasAlreadyProcessedMessage(msg)) return;
1442
1445
  const payload = {
1443
- action: postfixWithEndpointName(`color_move`, msg, model),
1446
+ action: postfixWithEndpointName(`color_move`, msg, model, meta),
1444
1447
  action_color: {
1445
1448
  x: precisionRound(msg.data.colorx / 65536, 3),
1446
1449
  y: precisionRound(msg.data.colory / 65536, 3),
@@ -1457,7 +1460,7 @@ const converters = {
1457
1460
  convert: (model, msg, publish, options, meta) => {
1458
1461
  if (hasAlreadyProcessedMessage(msg)) return;
1459
1462
  const movestop = msg.data.movemode == 1 ? 'move' : 'stop';
1460
- const action = postfixWithEndpointName(`hue_${movestop}`, msg, model);
1463
+ const action = postfixWithEndpointName(`hue_${movestop}`, msg, model, meta);
1461
1464
  const payload = {action, action_rate: msg.data.rate};
1462
1465
  addActionGroup(payload, msg, model);
1463
1466
  return payload;
@@ -1469,7 +1472,7 @@ const converters = {
1469
1472
  convert: (model, msg, publish, options, meta) => {
1470
1473
  if (hasAlreadyProcessedMessage(msg)) return;
1471
1474
  const payload = {
1472
- action: postfixWithEndpointName('move_to_saturation', msg, model),
1475
+ action: postfixWithEndpointName('move_to_saturation', msg, model, meta),
1473
1476
  action_saturation: msg.data.saturation,
1474
1477
  action_transition_time: msg.data.transtime,
1475
1478
  };
@@ -1483,7 +1486,7 @@ const converters = {
1483
1486
  convert: (model, msg, publish, options, meta) => {
1484
1487
  if (hasAlreadyProcessedMessage(msg)) return;
1485
1488
  const payload = {
1486
- action: postfixWithEndpointName(`move_to_hue`, msg, model),
1489
+ action: postfixWithEndpointName(`move_to_hue`, msg, model, meta),
1487
1490
  action_hue: msg.data.hue,
1488
1491
  action_transition_time: msg.data.transtime / 100,
1489
1492
  action_direction: msg.data.direction === 0 ? 'decrement' : 'increment',
@@ -1497,7 +1500,7 @@ const converters = {
1497
1500
  type: 'commandEmergency',
1498
1501
  convert: (model, msg, publish, options, meta) => {
1499
1502
  if (hasAlreadyProcessedMessage(msg)) return;
1500
- const payload = {action: postfixWithEndpointName(`emergency`, msg, model)};
1503
+ const payload = {action: postfixWithEndpointName(`emergency`, msg, model, meta)};
1501
1504
  addActionGroup(payload, msg, model);
1502
1505
  return payload;
1503
1506
  },
@@ -1507,7 +1510,7 @@ const converters = {
1507
1510
  type: 'commandOn',
1508
1511
  convert: (model, msg, publish, options, meta) => {
1509
1512
  if (hasAlreadyProcessedMessage(msg)) return;
1510
- const property = postfixWithEndpointName('state', msg, model);
1513
+ const property = postfixWithEndpointName('state', msg, model, meta);
1511
1514
  return {[property]: 'ON'};
1512
1515
  },
1513
1516
  },
@@ -1516,7 +1519,7 @@ const converters = {
1516
1519
  type: 'commandOff',
1517
1520
  convert: (model, msg, publish, options, meta) => {
1518
1521
  if (hasAlreadyProcessedMessage(msg)) return;
1519
- const property = postfixWithEndpointName('state', msg, model);
1522
+ const property = postfixWithEndpointName('state', msg, model, meta);
1520
1523
  return {[property]: 'OFF'};
1521
1524
  },
1522
1525
  },
@@ -1524,7 +1527,7 @@ const converters = {
1524
1527
  cluster: 'genIdentify',
1525
1528
  type: ['attributeReport', 'readResponse'],
1526
1529
  convert: (model, msg, publish, options, meta) => {
1527
- return {action: postfixWithEndpointName(`identify`, msg, model)};
1530
+ return {action: postfixWithEndpointName(`identify`, msg, model, meta)};
1528
1531
  },
1529
1532
  },
1530
1533
  cover_position_tilt: {
@@ -1540,11 +1543,11 @@ const converters = {
1540
1543
  const invert = model.meta && model.meta.coverInverted ? !options.invert_cover : options.invert_cover;
1541
1544
  if (msg.data.hasOwnProperty('currentPositionLiftPercentage') && msg.data['currentPositionLiftPercentage'] <= 100) {
1542
1545
  const value = msg.data['currentPositionLiftPercentage'];
1543
- result[postfixWithEndpointName('position', msg, model)] = invert ? value : 100 - value;
1546
+ result[postfixWithEndpointName('position', msg, model, meta)] = invert ? value : 100 - value;
1544
1547
  }
1545
1548
  if (msg.data.hasOwnProperty('currentPositionTiltPercentage') && msg.data['currentPositionTiltPercentage'] <= 100) {
1546
1549
  const value = msg.data['currentPositionTiltPercentage'];
1547
- result[postfixWithEndpointName('tilt', msg, model)] = invert ? value : 100 - value;
1550
+ result[postfixWithEndpointName('tilt', msg, model, meta)] = invert ? value : 100 - value;
1548
1551
  }
1549
1552
  return result;
1550
1553
  },
@@ -1906,10 +1909,10 @@ const converters = {
1906
1909
  options: [exposes.options.precision('voc'), exposes.options.calibration('voc')],
1907
1910
  convert: (model, msg, publish, options, meta) => {
1908
1911
  const voc = parseFloat(msg.data['measuredValue']);
1909
- const vocProperty = postfixWithEndpointName('voc', msg, model);
1912
+ const vocProperty = postfixWithEndpointName('voc', msg, model, meta);
1910
1913
 
1911
1914
  let airQuality;
1912
- const airQualityProperty = postfixWithEndpointName('air_quality', msg, model);
1915
+ const airQualityProperty = postfixWithEndpointName('air_quality', msg, model, meta);
1913
1916
  if (voc <= 65) {
1914
1917
  airQuality = 'excellent';
1915
1918
  } else if (voc <= 220) {
@@ -2581,7 +2584,7 @@ const converters = {
2581
2584
  convert: (model, msg, publish, options, meta) => {
2582
2585
  const lookup = {0: 'off', 1: 'on', 2: 'previous'};
2583
2586
  if (msg.data.hasOwnProperty('moesStartUpOnOff')) {
2584
- const property = postfixWithEndpointName('power_on_behavior', msg, model);
2587
+ const property = postfixWithEndpointName('power_on_behavior', msg, model, meta);
2585
2588
  return {[property]: lookup[msg.data['moesStartUpOnOff']]};
2586
2589
  }
2587
2590
  },
@@ -3513,106 +3516,108 @@ const converters = {
3513
3516
  const result = {};
3514
3517
  // Danfoss sends pi_heating_demand as raw %
3515
3518
  if (typeof msg.data['pIHeatingDemand'] == 'number') {
3516
- result[postfixWithEndpointName('pi_heating_demand', msg, model)] =
3519
+ result[postfixWithEndpointName('pi_heating_demand', msg, model, meta)] =
3517
3520
  precisionRound(msg.data['pIHeatingDemand'], 0);
3518
3521
  }
3519
3522
  if (msg.data.hasOwnProperty('danfossWindowOpenFeatureEnable')) {
3520
- result[postfixWithEndpointName('window_open_feature', msg, model)] =
3523
+ result[postfixWithEndpointName('window_open_feature', msg, model, meta)] =
3521
3524
  (msg.data['danfossWindowOpenFeatureEnable'] === 1);
3522
3525
  }
3523
3526
  if (msg.data.hasOwnProperty('danfossWindowOpenInternal')) {
3524
- result[postfixWithEndpointName('window_open_internal', msg, model)] =
3527
+ result[postfixWithEndpointName('window_open_internal', msg, model, meta)] =
3525
3528
  constants.danfossWindowOpen.hasOwnProperty(msg.data['danfossWindowOpenInternal']) ?
3526
3529
  constants.danfossWindowOpen[msg.data['danfossWindowOpenInternal']] :
3527
3530
  msg.data['danfossWindowOpenInternal'];
3528
3531
  }
3529
3532
  if (msg.data.hasOwnProperty('danfossWindowOpenExternal')) {
3530
- result[postfixWithEndpointName('window_open_external', msg, model)] = (msg.data['danfossWindowOpenExternal'] === 1);
3533
+ result[postfixWithEndpointName('window_open_external', msg, model, meta)] = (msg.data['danfossWindowOpenExternal'] === 1);
3531
3534
  }
3532
3535
  if (msg.data.hasOwnProperty('danfossDayOfWeek')) {
3533
- result[postfixWithEndpointName('day_of_week', msg, model)] =
3536
+ result[postfixWithEndpointName('day_of_week', msg, model, meta)] =
3534
3537
  constants.dayOfWeek.hasOwnProperty(msg.data['danfossDayOfWeek']) ?
3535
3538
  constants.dayOfWeek[msg.data['danfossDayOfWeek']] :
3536
3539
  msg.data['danfossDayOfWeek'];
3537
3540
  }
3538
3541
  if (msg.data.hasOwnProperty('danfossTriggerTime')) {
3539
- result[postfixWithEndpointName('trigger_time', msg, model)] = msg.data['danfossTriggerTime'];
3542
+ result[postfixWithEndpointName('trigger_time', msg, model, meta)] = msg.data['danfossTriggerTime'];
3540
3543
  }
3541
3544
  if (msg.data.hasOwnProperty('danfossMountedModeActive')) {
3542
- result[postfixWithEndpointName('mounted_mode_active', msg, model)] = (msg.data['danfossMountedModeActive'] === 1);
3545
+ result[postfixWithEndpointName('mounted_mode_active', msg, model, meta)] = (msg.data['danfossMountedModeActive'] === 1);
3543
3546
  }
3544
3547
  if (msg.data.hasOwnProperty('danfossMountedModeControl')) {
3545
- result[postfixWithEndpointName('mounted_mode_control', msg, model)] = (msg.data['danfossMountedModeControl'] === 1);
3548
+ result[postfixWithEndpointName('mounted_mode_control', msg, model, meta)] = (msg.data['danfossMountedModeControl'] === 1);
3546
3549
  }
3547
3550
  if (msg.data.hasOwnProperty('danfossThermostatOrientation')) {
3548
- result[postfixWithEndpointName('thermostat_vertical_orientation', msg, model)] =
3551
+ result[postfixWithEndpointName('thermostat_vertical_orientation', msg, model, meta)] =
3549
3552
  (msg.data['danfossThermostatOrientation'] === 1);
3550
3553
  }
3551
3554
  if (msg.data.hasOwnProperty('danfossExternalMeasuredRoomSensor')) {
3552
- result[postfixWithEndpointName('external_measured_room_sensor', msg, model)] =
3555
+ result[postfixWithEndpointName('external_measured_room_sensor', msg, model, meta)] =
3553
3556
  msg.data['danfossExternalMeasuredRoomSensor'];
3554
3557
  }
3555
3558
  if (msg.data.hasOwnProperty('danfossRadiatorCovered')) {
3556
- result[postfixWithEndpointName('radiator_covered', msg, model)] = (msg.data['danfossRadiatorCovered'] === 1);
3559
+ result[postfixWithEndpointName('radiator_covered', msg, model, meta)] = (msg.data['danfossRadiatorCovered'] === 1);
3557
3560
  }
3558
3561
  if (msg.data.hasOwnProperty('danfossViewingDirection')) {
3559
- result[postfixWithEndpointName('viewing_direction', msg, model)] = (msg.data['danfossViewingDirection'] === 1);
3562
+ result[postfixWithEndpointName('viewing_direction', msg, model, meta)] = (msg.data['danfossViewingDirection'] === 1);
3560
3563
  }
3561
3564
  if (msg.data.hasOwnProperty('danfossAlgorithmScaleFactor')) {
3562
- result[postfixWithEndpointName('algorithm_scale_factor', msg, model)] = msg.data['danfossAlgorithmScaleFactor'];
3565
+ result[postfixWithEndpointName('algorithm_scale_factor', msg, model, meta)] = msg.data['danfossAlgorithmScaleFactor'];
3563
3566
  }
3564
3567
  if (msg.data.hasOwnProperty('danfossHeatAvailable')) {
3565
- result[postfixWithEndpointName('heat_available', msg, model)] = (msg.data['danfossHeatAvailable'] === 1);
3568
+ result[postfixWithEndpointName('heat_available', msg, model, meta)] = (msg.data['danfossHeatAvailable'] === 1);
3566
3569
  }
3567
3570
  if (msg.data.hasOwnProperty('danfossHeatRequired')) {
3568
3571
  if (msg.data['danfossHeatRequired'] === 1) {
3569
- result[postfixWithEndpointName('heat_required', msg, model)] = true;
3570
- result[postfixWithEndpointName('running_state', msg, model)] = 'heat';
3572
+ result[postfixWithEndpointName('heat_required', msg, model, meta)] = true;
3573
+ result[postfixWithEndpointName('running_state', msg, model, meta)] = 'heat';
3571
3574
  } else {
3572
- result[postfixWithEndpointName('heat_required', msg, model)] = false;
3573
- result[postfixWithEndpointName('running_state', msg, model)] = 'idle';
3575
+ result[postfixWithEndpointName('heat_required', msg, model, meta)] = false;
3576
+ result[postfixWithEndpointName('running_state', msg, model, meta)] = 'idle';
3574
3577
  }
3575
3578
  }
3576
3579
  if (msg.data.hasOwnProperty('danfossLoadBalancingEnable')) {
3577
- result[postfixWithEndpointName('load_balancing_enable', msg, model)] = (msg.data['danfossLoadBalancingEnable'] === 1);
3580
+ result[postfixWithEndpointName('load_balancing_enable', msg, model, meta)] = (msg.data['danfossLoadBalancingEnable'] === 1);
3578
3581
  }
3579
3582
  if (msg.data.hasOwnProperty('danfossLoadRoomMean')) {
3580
- result[postfixWithEndpointName('load_room_mean', msg, model)] = msg.data['danfossLoadRoomMean'];
3583
+ result[postfixWithEndpointName('load_room_mean', msg, model, meta)] = msg.data['danfossLoadRoomMean'];
3581
3584
  }
3582
3585
  if (msg.data.hasOwnProperty('danfossLoadEstimate')) {
3583
- result[postfixWithEndpointName('load_estimate', msg, model)] = msg.data['danfossLoadEstimate'];
3586
+ result[postfixWithEndpointName('load_estimate', msg, model, meta)] = msg.data['danfossLoadEstimate'];
3584
3587
  }
3585
3588
  if (msg.data.hasOwnProperty('danfossPreheatStatus')) {
3586
- result[postfixWithEndpointName('preheat_status', msg, model)] = (msg.data['danfossPreheatStatus'] === 1);
3589
+ result[postfixWithEndpointName('preheat_status', msg, model, meta)] = (msg.data['danfossPreheatStatus'] === 1);
3587
3590
  }
3588
3591
  if (msg.data.hasOwnProperty('danfossAdaptionRunStatus')) {
3589
- result[postfixWithEndpointName('adaptation_run_status', msg, model)] =
3592
+ result[postfixWithEndpointName('adaptation_run_status', msg, model, meta)] =
3590
3593
  constants.danfossAdaptionRunStatus[msg.data['danfossAdaptionRunStatus']];
3591
3594
  }
3592
3595
  if (msg.data.hasOwnProperty('danfossAdaptionRunSettings')) {
3593
- result[postfixWithEndpointName('adaptation_run_settings', msg, model)] = (msg.data['danfossAdaptionRunSettings'] === 1);
3596
+ result[postfixWithEndpointName('adaptation_run_settings', msg, model, meta)] =
3597
+ (msg.data['danfossAdaptionRunSettings'] === 1);
3594
3598
  }
3595
3599
  if (msg.data.hasOwnProperty('danfossAdaptionRunControl')) {
3596
- result[postfixWithEndpointName('adaptation_run_control', msg, model)] =
3600
+ result[postfixWithEndpointName('adaptation_run_control', msg, model, meta)] =
3597
3601
  constants.danfossAdaptionRunControl[msg.data['danfossAdaptionRunControl']];
3598
3602
  }
3599
3603
  if (msg.data.hasOwnProperty('danfossRegulationSetpointOffset')) {
3600
- result[postfixWithEndpointName('regulation_setpoint_offset', msg, model)] = msg.data['danfossRegulationSetpointOffset'];
3604
+ result[postfixWithEndpointName('regulation_setpoint_offset', msg, model, meta)] =
3605
+ msg.data['danfossRegulationSetpointOffset'];
3601
3606
  }
3602
3607
  // Danfoss Icon Converters
3603
3608
  if (msg.data.hasOwnProperty('danfossRoomStatusCode')) {
3604
- result[postfixWithEndpointName('room_status_code', msg, model)] =
3609
+ result[postfixWithEndpointName('room_status_code', msg, model, meta)] =
3605
3610
  constants.danfossRoomStatusCode.hasOwnProperty(msg.data['danfossRoomStatusCode']) ?
3606
3611
  constants.danfossRoomStatusCode[msg.data['danfossRoomStatusCode']] :
3607
3612
  msg.data['danfossRoomStatusCode'];
3608
3613
  }
3609
3614
  if (msg.data.hasOwnProperty('danfossOutputStatus')) {
3610
3615
  if (msg.data['danfossOutputStatus'] === 1) {
3611
- result[postfixWithEndpointName('output_status', msg, model)] = 'active';
3612
- result[postfixWithEndpointName('running_state', msg, model)] = 'heat';
3616
+ result[postfixWithEndpointName('output_status', msg, model, meta)] = 'active';
3617
+ result[postfixWithEndpointName('running_state', msg, model, meta)] = 'heat';
3613
3618
  } else {
3614
- result[postfixWithEndpointName('output_status', msg, model)] = 'inactive';
3615
- result[postfixWithEndpointName('running_state', msg, model)] = 'idle';
3619
+ result[postfixWithEndpointName('output_status', msg, model, meta)] = 'inactive';
3620
+ result[postfixWithEndpointName('running_state', msg, model, meta)] = 'idle';
3616
3621
  }
3617
3622
  }
3618
3623
  return result;
@@ -3630,7 +3635,7 @@ const converters = {
3630
3635
  let percentage = msg.data['batteryPercentageRemaining'];
3631
3636
  percentage = dontDividePercentage ? percentage : percentage / 2;
3632
3637
 
3633
- result[postfixWithEndpointName('battery', msg, model)] = precisionRound(percentage, 2);
3638
+ result[postfixWithEndpointName('battery', msg, model, meta)] = precisionRound(percentage, 2);
3634
3639
  }
3635
3640
  return result;
3636
3641
  },
@@ -3641,19 +3646,19 @@ const converters = {
3641
3646
  convert: (model, msg, publish, options, meta) => {
3642
3647
  const result = {};
3643
3648
  if (msg.data.hasOwnProperty('danfossSystemStatusCode')) {
3644
- result[postfixWithEndpointName('system_status_code', msg, model)] =
3649
+ result[postfixWithEndpointName('system_status_code', msg, model, meta)] =
3645
3650
  constants.danfossSystemStatusCode.hasOwnProperty(msg.data['danfossSystemStatusCode']) ?
3646
3651
  constants.danfossSystemStatusCode[msg.data['danfossSystemStatusCode']] :
3647
3652
  msg.data['danfossSystemStatusCode'];
3648
3653
  }
3649
3654
  if (msg.data.hasOwnProperty('danfossSystemStatusWater')) {
3650
- result[postfixWithEndpointName('system_status_water', msg, model)] =
3655
+ result[postfixWithEndpointName('system_status_water', msg, model, meta)] =
3651
3656
  constants.danfossSystemStatusWater.hasOwnProperty(msg.data['danfossSystemStatusWater']) ?
3652
3657
  constants.danfossSystemStatusWater[msg.data['danfossSystemStatusWater']] :
3653
3658
  msg.data['danfossSystemStatusWater'];
3654
3659
  }
3655
3660
  if (msg.data.hasOwnProperty('danfossMultimasterRole')) {
3656
- result[postfixWithEndpointName('multimaster_role', msg, model)] =
3661
+ result[postfixWithEndpointName('multimaster_role', msg, model, meta)] =
3657
3662
  constants.danfossMultimasterRole.hasOwnProperty(msg.data['danfossMultimasterRole']) ?
3658
3663
  constants.danfossMultimasterRole[msg.data['danfossMultimasterRole']] :
3659
3664
  msg.data['danfossMultimasterRole'];
@@ -3757,7 +3762,7 @@ const converters = {
3757
3762
  }
3758
3763
 
3759
3764
  const payload = {
3760
- action: postfixWithEndpointName(`color_temperature_move`, msg, model),
3765
+ action: postfixWithEndpointName(`color_temperature_move`, msg, model, meta),
3761
3766
  action_color_temperature: msg.data.colortemp,
3762
3767
  action_transition_time: msg.data.transtime,
3763
3768
  action_color_temperature_direction: direction,
@@ -4918,7 +4923,7 @@ const converters = {
4918
4923
  type: ['attributeReport', 'readResponse'],
4919
4924
  convert: (model, msg, publish, options, meta) => {
4920
4925
  if (msg.data.hasOwnProperty(0xfc00)) {
4921
- const property = postfixWithEndpointName('min_brightness', msg, model);
4926
+ const property = postfixWithEndpointName('min_brightness', msg, model, meta);
4922
4927
  const value = parseInt(msg.data[0xfc00].toString(16).slice(0, 2), 16);
4923
4928
  return {[property]: value};
4924
4929
  }
@@ -4950,7 +4955,7 @@ const converters = {
4950
4955
  cluster: 'genOnOff',
4951
4956
  type: 'commandToggle',
4952
4957
  convert: (model, msg, publish, options, meta) => {
4953
- return {action: postfixWithEndpointName('toggle', msg, model)};
4958
+ return {action: postfixWithEndpointName('toggle', msg, model, meta)};
4954
4959
  },
4955
4960
  },
4956
4961
  ikea_arrow_click: {
@@ -5413,7 +5418,7 @@ const converters = {
5413
5418
  type: ['attributeReport', 'readResponse'],
5414
5419
  convert: (model, msg, publish, options, meta) => {
5415
5420
  const multiEndpoint = model.meta && model.meta.multiEndpoint;
5416
- const property = multiEndpoint ? postfixWithEndpointName('state', msg, model) : 'state';
5421
+ const property = multiEndpoint ? postfixWithEndpointName('state', msg, model, meta) : 'state';
5417
5422
  return {[property]: msg.data.presentValue ? 'ON' : 'OFF'};
5418
5423
  },
5419
5424
  },
@@ -5889,7 +5894,7 @@ const converters = {
5889
5894
  const actionLookup = {0: 'release', 1: 'single', 2: 'double', 3: 'tripple', 4: 'hold'};
5890
5895
  const value = msg.data['presentValue'];
5891
5896
  const action = actionLookup[value];
5892
- return {action: postfixWithEndpointName(action, msg, model)};
5897
+ return {action: postfixWithEndpointName(action, msg, model, meta)};
5893
5898
  },
5894
5899
  },
5895
5900
  terncy_raw: {
@@ -5972,12 +5977,12 @@ const converters = {
5972
5977
  const value = msg.data['currentPositionLiftPercentage'];
5973
5978
  const position = invert ? 100 - value : value;
5974
5979
  const state = invert ? (position > 0 ? 'CLOSE' : 'OPEN') : (position > 0 ? 'OPEN' : 'CLOSE');
5975
- result[postfixWithEndpointName('position', msg, model)] = position;
5976
- result[postfixWithEndpointName('state', msg, model)] = state;
5980
+ result[postfixWithEndpointName('position', msg, model, meta)] = position;
5981
+ result[postfixWithEndpointName('state', msg, model, meta)] = state;
5977
5982
  }
5978
5983
  if (msg.data.hasOwnProperty('currentPositionTiltPercentage') && msg.data['currentPositionTiltPercentage'] <= 100) {
5979
5984
  const value = msg.data['currentPositionTiltPercentage'];
5980
- result[postfixWithEndpointName('tilt', msg, model)] = invert ? 100 - value : value;
5985
+ result[postfixWithEndpointName('tilt', msg, model, meta)] = invert ? 100 - value : value;
5981
5986
  }
5982
5987
  return result;
5983
5988
  },
@@ -6256,7 +6261,7 @@ const converters = {
6256
6261
  cluster: 'lightingColorCtrl',
6257
6262
  type: ['raw'],
6258
6263
  convert: (model, msg, publish, options, meta) => {
6259
- const payload = {action: postfixWithEndpointName(`color_stop`, msg, model)};
6264
+ const payload = {action: postfixWithEndpointName(`color_stop`, msg, model, meta)};
6260
6265
  addActionGroup(payload, msg, model);
6261
6266
  return payload;
6262
6267
  },
@@ -7008,7 +7013,7 @@ const converters = {
7008
7013
  options: [exposes.options.legacy()],
7009
7014
  convert: (model, msg, publish, options, meta) => {
7010
7015
  const action = msg.data['onOff'] === 1 ? 'release' : 'hold';
7011
- const payload = {action: postfixWithEndpointName(action, msg, model)};
7016
+ const payload = {action: postfixWithEndpointName(action, msg, model, meta)};
7012
7017
 
7013
7018
  if (isLegacyEnabled(options)) {
7014
7019
  const key = `button_${getKey(model.endpoint(msg.device), msg.endpoint.ID)}`;
@@ -7024,7 +7029,7 @@ const converters = {
7024
7029
  convert: (model, msg, publish, options, meta) => {
7025
7030
  // Xiaomi wall switches use endpoint 4, 5 or 6 to indicate an action on the button so we have to skip that.
7026
7031
  if (msg.data.hasOwnProperty('onOff') && ![4, 5, 6].includes(msg.endpoint.ID)) {
7027
- const property = postfixWithEndpointName('state', msg, model);
7032
+ const property = postfixWithEndpointName('state', msg, model, meta);
7028
7033
  return {[property]: msg.data['onOff'] === 1 ? 'ON' : 'OFF'};
7029
7034
  }
7030
7035
  },
@@ -7282,7 +7287,7 @@ const converters = {
7282
7287
  const value = msg.data[property];
7283
7288
 
7284
7289
  if (dict.hasOwnProperty(value)) {
7285
- return {[postfixWithEndpointName('power_outage_memory', msg, model)]: dict[value]};
7290
+ return {[postfixWithEndpointName('power_outage_memory', msg, model, meta)]: dict[value]};
7286
7291
  }
7287
7292
  }
7288
7293
  },
@@ -7298,7 +7303,7 @@ const converters = {
7298
7303
  const value = msg.data[property];
7299
7304
 
7300
7305
  if (dict.hasOwnProperty(value)) {
7301
- return {[postfixWithEndpointName('indicator_mode', msg, model)]: dict[value]};
7306
+ return {[postfixWithEndpointName('indicator_mode', msg, model, meta)]: dict[value]};
7302
7307
  }
7303
7308
  }
7304
7309
  },
@@ -7596,7 +7601,7 @@ const converters = {
7596
7601
  options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature')],
7597
7602
  convert: (model, msg, publish, options, meta) => {
7598
7603
  const temperature = parseFloat(msg.data['measuredValue']) / 100.0;
7599
- const property = postfixWithEndpointName('local_temperature', msg, model);
7604
+ const property = postfixWithEndpointName('local_temperature', msg, model, meta);
7600
7605
  return {[property]: calibrateAndPrecisionRoundOptions(temperature, options, 'temperature')};
7601
7606
  },
7602
7607
  },
@@ -8339,7 +8344,7 @@ const converters = {
8339
8344
  if (msg.data[2] !== 71) return;
8340
8345
  if (hasAlreadyProcessedMessage(msg)) return;
8341
8346
  const movestop = 'stop';
8342
- const action = postfixWithEndpointName(`hue_${movestop}`, msg, model);
8347
+ const action = postfixWithEndpointName(`hue_${movestop}`, msg, model, meta);
8343
8348
  const payload = {action};
8344
8349
  addActionGroup(payload, msg, model);
8345
8350
  return payload;