Hi i have the following Problem.
Input item:
Number MPC_Sensor1 "Number [JS(divide10.js):%s]" <temperature> {snmp="<[192.168.0.10:public:.1.3.6.1.4.1.14848.2.1.2.1.5.1:1:10000]"}
Sitemap item:
sitemap snmp label="snmp"
{
Text item=MPC_Sensor1 label="Temperatur Garderobe"
}
Shows me:
“TempIcon” Temperatur Garderobe 22.1
But i want to have a 22.1°C
If i put
Input item:
Number MPC_Sensor1 "Number [JS(divide10.js):%s °C*]" <temperature> {snmp="<[192.168.0.10:public:.1.3.6.1.4.1.14848.2.1.2.1.5.1:1:10000]"}
it’s not showing up because the JS is getting executed and overwrites it.
If i only put:
Number MPC_Sensor1 "Number [%s °C*]" <temperature> {snmp="<[192.168.0.10:public:.1.3.6.1.4.1.14848.2.1.2.1.5.1:1:10000]"}
The sitemap shows me:
“TempIcon” Temperatur Garderobe 221 °C
So i can either devide by ten or i can add the “°C” at the end.
With the modbus Binding i do not have this problem because there i can use the JS even in the binding like:
Number Heliotherm1 "Number [%.1f°C]" <temperature> {modbus="<[slave2:1:transformation=JS(divide10.js)]"}
Does anyone have a idea ?
Cheers