Can anybody help me.
I come from excel coding, so im still new to this. I have this code which detects whether my number is greater than 0, and if so, then it runs a timer function and then shuts off, otherwise if timer is 0, then it just runs without shutting off.
But I am trying to change the string that the sendnotification uses, to include the timer minutes.
this is some code i have tried.
Nothing i have tried so far works.
rule “Zone 1 Watering”
Item SprinklerSystemZone1 changed to ON
var Number timeout = onHours1.state as DecimalType
var int lawnTime = (timeout).intValue
var String numberAsString = "Watering for " + String.valueOf(lawnTime)
postUpdate(Irrigation_StartTime1, new DateTimeType())
if (lawnTime > 0)
sendBroadcastNotification(“Watering Zone 1”)