Hey,
i would like to know if it’s possible to create a Blockly skript with a loop that gets the same value, for example a temperature, from a group of thermostats and react when one of them is below or above a defined value?
Another usecase would be to observe all batteriestates by creating a group batteries and request them all in one simple loop.
something like
for(all items of group "Batteries"){
if(itemRegistry.getItem('Batteries').getState() <= "10"){
telegramAction.sendTelegram("Batterie xy is getting low");
}
}
i played a little bit with lists and variables but i wasnt able to figure out how this could work.
Script execution of rule with UID '7128728f30' failed: <eval>:4:23 Expected ident but found .
i tried to read something about javascript but i don’t get it how this is suposed to work. if someone has a simular sollution maybe he could post it and explain how it works.
I have set this script to be triggered every saturday at 12:00.
TelegramText is a string item wich will send this string to telegram when this item changes.
this way i can use blockly for shorter rules including telegram.