im after a way to concantenate a string for use in a goodnight script
currently i have a welcome home that welcomes people home by name when they arrive
Code: Select all
local delay = 30
local name = device.name
if (device.state == 'On') then
os.execute('(sleep '..delay..';tts welcome home "'..name..'" > /dev/null)&')
end
end
so if out of 4 person 2 and 3 are home it would say
goodnight 2 and 3
if 3 people were home it would say goodnight 2,3, and 4....
im sure this is possible using local settings but im just not sure how to get the concant to work the way i want it to...
also how to get it to only say it for devices that are turned on