//Put all Shutters towards south down to 22% for heat protection const position = 22; const allShutters = $('shelly.0.*.Shutter.Position'); const shuttersOnSouth = ["SHSW-25#84CCA8B0D29B#1", "SHSW-25#84CCA8B11690#1", "SHSW-25#84CCA8B15259#1", "SHSW-25#84CCA8B16945#1"]; heatProtection(); stopScript("script.js.Shelly.HeatProtection"); function heatProtection() { allShellyWithShutter.each(function (shutter, i) { let shutterName = shutter.split('.')[2]; if (shuttersToAutomate.includes(shutterName)) { log("Setting position of " + shutterName + " to " + position + "% for heat protection."); sendTo("telegram", "send", { text: "Setting position of " + shutterName + " to " + position + "% for heat protection." }); setState(shutter, position); } }); }