Hi,
Two Problems:
I have trouble with the inital Status after Page loading:
When the page loads i see in the console for example: steckdose2 true
But the switch stays “off”, when i click it the lamp turns off and the switch changes to “off” but on every page load it looks like “off”
Second Problem is my temperature sensor.
The Code:
console.log(devices[16].id, devices[16]["attributes"][0].value);
if (devices[16].id == "tempsensor2"){
var temp1tempload = devices[16]["attributes"][0].value.toString()
document.getElementById("tempsensor2").innerHTML = "Temperatursensor2: "+temp1tempload.value+" C";
}
In the Console Output I get
"tempsensor2 4.3"
where “4.3” ist the temperature value
In the interface it always says “Undefined”.
The Code for the temperature Sensor in the “realtime interface check” is not changed yet.
Can you help me with that?