I’m trying to send a notification when a temp sensor drops below a certain number but am getting this error?
An error occurred during the script execution: index=1, size=1
rule “Master Bedroom Temperature Alerts”
when
Item Master_Bedroom changed
then
if (Master_Bedroom.state > 22) {
sendPushbulletNote(“Master Bedroom Temperature above 22°”)
}
else if (Master_Bedroom.state < 18) {
sendPushbulletNote(“Master Bedroom Temperature under 18°”)
}
end
Is Master_Bedroom using UoM? Either way, you will need to cast it’s state to Number or QuantityType. If the latter, the value you are comparing to needs to also be a QuantityType.
They are still there, just invisible. It is easier to just put an empty line, then ``` on the line before and after your code or log.