{
module: "MMM-ValuesByNotification",
position: "top_right",
//header: "Sensors",
config: {
debug: true,
animationSpeed: 0,
updateInterval: 90,
valuePositions: "tivu",
classes: "environment",
naValue: "na.na",
valueFormat: "Number(${value}).toFixed(1)",
transformerFunctions: {
zisterneAddPercent: (value) => {
return value+"l ("+(Number(value/1600)*100).toFixed(0)+"%)"
},
rountToInt: (value) => {
try {
return Math.round(parseFloat(value))
} catch {
return value
}
},
toKiloValue: (value) => {
if(value >= 10000){
value = Math.round(value/10000)
return value+"k"
} else {
return value
}
},
},
groups: [
{
items: [
{
valueTitle: "Dach",
notification: "KNX_DACH_TEMP",
reuseCount: 50,
values: [
{
valueIcon: "fxemoji:thermometer",
valueUnit: "°C",
},
]
},
{
notification: "KNX_DACH_LIGHT",
reuseCount: 1000,
naValue: "na",
valueFormat: "{value}",
valueTransformers: ["rountToInt", "toKiloValue"],
values: [
{
valueIcon: "fa-sun-o",
valueUnit: "Lux",
},
]
},
]
},
{
items: [
{
valueTitle: "Südseite",
notification: "TEMPERATURE_C_ESPNORD",
reuseCount: 4,
values: [
{
valueIcon: "fxemoji:thermometer",
valueUnit: "°C",
},
]
},
{
notification: "HUMIDITY_ESPNORD",
reuseCount: 4,
values: [
{
valueIcon: "fa fa-tint",
valueUnit: "%rH",
},
]
},
]
},
{
items: [
{
valueTitle: "Büro",
notification: "TEMPERATURE_C_ESPBUERO",
reuseCount: 4,
values: [
{
valueIcon: "fxemoji:thermometer",
valueUnit: "°C",
},
]
},
{
notification: "HUMIDITY_ESPBUERO",
reuseCount: 4,
values: [
{
valueIcon: "fa fa-tint",
valueUnit: "%rH",
},
]
},
]
},
{
items: [
{
valueTitle: "Schlafen",
notification: "KNX_OG_SZ_TEMP",
reuseCount: 180,
values: [
{
valueIcon: "fxemoji:thermometer",
valueUnit: "°C",
},
]
},
{
notification: "KNX_OG_SZ_TEMP_SET",
reuseCount: 100000,
values: [
{
naValue: "(na.na",
valueUnit: "°C)",
valueIcon: "mdi:home-thermometer",
valueFormat: "\"(\"+Number(${value}).toFixed(1)"
},
]
},
]
},
{
items: [
{
valueTitle: "Bad",
notification: "KNX_OG_BAD_TEMP",
reuseCount: 180,
values: [
{
valueIcon: "fxemoji:thermometer",
valueUnit: "°C",
},
]
},
{
notification: "KNX_OG_BAD_TEMP_SET",
reuseCount: 100000,
values: [
{
naValue: "(na.na",
valueUnit: "°C)",
valueIcon: "mdi:home-thermometer",
valueFormat: "\"(\"+Number(${value}).toFixed(1)"
},
]
},
]
},
{
items: [
{
valueTitle: "Nähen",
notification: "KNX_OG_GALERIE_TEMP",
reuseCount: 180,
values: [
{
valueIcon: "fxemoji:thermometer",
valueUnit: "°C",
},
]
},
{
notification: "KNX_OG_GALERIE_TEMP_SET",
reuseCount: 100000,
values: [
{
naValue: "(na.na",
valueUnit: "°C)",
valueIcon: "mdi:home-thermometer",
valueFormat: "\"(\"+Number(${value}).toFixed(1)"
},
]
},
]
},
{
items: [
{
valueTitle: "Kinder",
notification: "KNX_OG_KINDER_TEMP",
reuseCount: 180,
values: [
{
valueIcon: "fxemoji:thermometer",
valueUnit: "°C",
},
]
},
{
notification: "KNX_OG_KINDER_TEMP_SET",
reuseCount: 100000,
values: [
{
naValue: "(na.na",
valueUnit: "°C)",
valueIcon: "mdi:home-thermometer",
valueFormat: "\"(\"+Number(${value}).toFixed(1)"
},
]
},
]
},
{
items: [
{
valueTitle: "Wohnzimmer",
notification: "KNX_EG_WZ_TEMP",
reuseCount: 180,
values: [
{
valueIcon: "fxemoji:thermometer",
valueUnit: "°C",
},
]
},
{
notification: "KNX_EG_WZ_TEMP_SET",
reuseCount: 100000,
values: [
{
naValue: "(na.na",
valueUnit: "°C)",
valueIcon: "mdi:home-thermometer",
valueFormat: "\"(\"+Number(${value}).toFixed(1)"
},
]
},
]
},
//ZISTERNE
{
valueFormat: "{value}",
classes: "zisterne",
items: [
{
notification: "ZISTERNE_VALUES",
reuseCount: 15,
jsonpath: "rounded",
naValue: "na",
values: [
{
valueTitle: "Zisterne",
valuePositions: "ti[v]",
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-0.svg",
valueUnit: "l",
valueTransformers: ["zisterneAddPercent"],
thresholds: [
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-100.png",
type: "gt",
value: 1550,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-90.png",
type: "gt",
value: 1395,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-80.png",
type: "gt",
value: 1240,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-70.png",
type: "gt",
value: 1085,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-60.png",
type: "gt",
value: 930,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-50.png",
type: "gt",
value: 775,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-40.png",
type: "gt",
value: 620,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-30.png",
type: "gt",
value: 465,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-20.png",
type: "gt",
value: 310,
},
{
valueImgIcon: "modules/MMM-ValuesByNotification/icons/wassertank/wassertank-10.png",
type: "gt",
value: 155,
},
]
},
]
},
]
}
]
},
classes: "pageC"
},
Maybe the new way to parse the config is the problem. I am not that deep in the core to check what happens during the start.
Hi and sorry for the big config but i do not want a small detail being responsible for my current problem.
After the update to 2.35 my transformerFunctions do not work anymore.
I am not sure what is the reason for this and i am very sure that my module is a edge case in the Mirror world.
Environment
System Information
WAYLAND_DISPLAY: undefined; DISPLAY: :0; ELECTRON_ENABLE_GPU: undefined
Which start option are you using?
node --run start
Are you using PM2?
Yes
Module
None
Have you tried disabling other modules?
Have you searched if someone else has already reported the issue on the forum or in the issues?
What did you do?
Configuration
What did you expect to happen?
Maybe the new way to parse the config is the problem. I am not that deep in the core to check what happens during the start.
What actually happened?
Hi and sorry for the big config but i do not want a small detail being responsible for my current problem.
After the update to 2.35 my transformerFunctions do not work anymore.
The idea is to provide transformer functions in
config->transformerFunctionswhich are small javascript functions which then can be called later in values either single or after each other.Everything works as expected since years but after the upgrade to 2.35 the
transformerFunctionsare empty ({}) and can not be called later.I am not sure what is the reason for this and i am very sure that my module is a edge case in the Mirror world.
Additional comments
No response
Participation