Перепроверил - для указанного форка это не нужно, там обрабатываеются относительные значения.
Я допиливал 2 функции в device.js
- getMappedValue для того чтобы можно было делать маппинг для разных instance одного type разный, например вот для кондиционеров
Спойлер
valueMapping: [
{
type: 'on_off',
mapping: [[false, true], [0, 1]], // [yandex, mqtt]
},
{
type: 'toggle',
mapping: [[false, true], [0, 1]], // [yandex, mqtt]
},
{
type: 'mode',
instance:"fan_speed",
mapping: [["auto", "turbo", "high", "medium", "low", "quiet"], ["0", "5", "4", "3", "2", "1"]], // [yandex, mqtt]
},
{
type: 'mode',
instance:"thermostat",
mapping: [["auto", "cool", "heat", "fan_only", "dry"], ["3", "2", "1", "5", "4"]], // [yandex, mqtt]
},
{
type: 'mode',
instance:"swing",
mapping: [["stationary", "auto", "one", "two", "three","four","five"], ["0", "1", "2", "3", "4", "5", "6"]], // [yandex, mqtt]
},
вот изменненная функция
Спойлер
getMappedValue(val, actType, instance, y2m) {
//evs 010524
//-const map = this.data.custom_data.valueMapping.find(m => m.type == actType);
//+
let map;
if (instance != undefined) {
map = this.data.custom_data.valueMapping.find(m => m.type == actType && m.instance == instance);
}
if (map == undefined) {
map = this.data.custom_data.valueMapping.find(m => m.type == actType);
}
//evs
if (map == undefined) return val;
// Percent invert
if (map.mapping == 'invert_percent') {
return 100 - parseInt(val)
}
// Custom function?
if (map.mapping instanceof Function) {
return map.mapping(this, instance, val, y2m)
}
var from, to;
if (y2m == true) [from, to] = map.mapping;
else [to, from] = map.mapping;
const mappedValue = to[from.indexOf(val)];
return (mappedValue != undefined) ? mappedValue : val;
}
и функцию setCapabilitiesState, для разных значений в разных топиках, но у упор не помню для чего 
Спойлер
setCapabilityState(val, relative, type, instance) {
const {id} = this.data;
const actType = String(type).split('.')[2];
const value = this.getMappedValue(val, actType, instance, true);
let relativePrefix = (relative && value > 0 && !isNaN(value)) ? '+' : ''
let message;
let topic, topicRaw; //evs
try {
const capability = this.findCapability(type, instance);
if (capability == undefined) throw new Error(`Can't find capability '${type}' in device '${id}'`);
capability.state.value = val;
//evs --
//- topic = this.findTopicByInstance(instance);
//- if (topic == undefined) throw new Error(`Can't find set topic for '${type}' in device '${id}'`);
//evs ++ //different topics for different values
topicRaw = this.findTopicByInstance(instance);
if (topicRaw == undefined) throw new Error(`Can't find set topic for '${type}' in device '${id}'`);
logger.info(`topicRaw ${JSON.stringify(topicRaw)}`); //evs
if (typeof topicRaw == 'string') {
topic=topicRaw;
} else if (typeof topicRaw == 'object') {
topic = topicRaw[val];
if (topic == undefined) throw new Error(`Can't find set topic for value '${val}' for '${type}' in device '${id}'`);
} else throw new Error(`Can't find set topic (unexpected type) for '${type}' in device '${id}'`);
//evs++
message = `${relativePrefix}${value}`;
} catch(e) {
topic = false;
logger.log('error', {message: `${e}`});
}
if (topic) {
global.mqttClient.publish(topic, message);
}
logger.info(`Command ${id}: instance ${instance}, topic ${topic}, command ${val}, message ${message}`)
return {
type,
'state': {
instance,
'action_result': {
'status': 'DONE'
}
}
}
}