I’ve searched the forum and not really found the answer. Likely because I’m doing something not many others do.
I have a couple of rules in place that create an announcement, for example I get my weather information from OWM and add that to a line of text. This is built as val sAnnouncement = “Good Morning, currently it’s " + Current_Temp.state + " degrees outside. The expected high is " + Today_Hi.state + " degrees.” I then update the item below, Voice_Announcement.sendCommand(sAnnouncement).
This works fine as it is, however when I then add in my travel time to work, this method doesn’t work so well. As a quick work around I’ve using the Thread::sleep(5000) after each update of Voice_Announcement.
Is there a better way to do this or am I going about it the wrong way altogether?
rule "Make Voice Announcement" when Item Voice_Announcement changed then val vAnnouncement = Voice_Announcement.state say(vAnnouncement) end