The text device is being updated by a Plex webhook. That works fine. So does my script. It just keeps repeating like crazy, where it actually should only run when the text device changes. It's really basic for the moment, but when I can get this behavior fixed I can build on from this. Please help?
This is my script:
Code: Select all
-- Plex verlichting woonkamer
commandArray = {}
if (string.find(otherdevices['Plex-Woonkamer'],'play') or
string.find(otherdevices['Plex-Woonkamer'],'resume'))
then
commandArray['LED-strip-TV']='Off'
else
commandArray['LED-strip-TV']='On'
end
return commandArray