Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else if (source.status["temperature.value"] !== undefined) {
model.template = "views/temperatureSensorTemplate.html";
}
else if (source.status["humidity.value"] !== undefined) {
model.template = "views/humiditySensorTemplate.html";
model.dangerValue = getSetting(source.settings, "app.humidity.danger_value", 75);
model.warningValue = getSetting(source.settings, "app.humidity.warning_value", 60);
}
else if (source.status["roller_shutter.state"] !== undefined) {
model.template = "views/rollerShutterTemplate.html";
}
else if (source.status["state_machine.state"] !== undefined) {
model.template = "views/stateMachineTemplate.html";
}
else if (source.status["level.current"] !== undefined) {
model.template = "views/fanTemplate.html";
}
else if (source.status["color.red"] !== undefined) {
model.template = "views/rgbTemplate.html";
model.selectedColor = "#FFFFFF";
}
else if (source.status["power.state"] !== undefined) {
model.template = "views/toggleTemplate.html";
}
}
}