Skip to content

Commit

Permalink
v1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
howartp84 committed Jun 20, 2021
1 parent d35d166 commit 852fb5c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Binary file modified Sense.indigoPlugin.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion Sense.indigoPlugin/Contents/Info.plist
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>1.0.7</string>
<string>1.0.8</string>
<key>ServerApiVersion</key>
<string>2.0</string>
<key>IwsApiVersion</key>
Expand Down
Binary file modified Sense.indigoPlugin/Contents/Resources/Thumbs.db
Binary file not shown.
10 changes: 9 additions & 1 deletion Sense.indigoPlugin/Contents/Server Plugin/plugin.py
Expand Up @@ -182,9 +182,17 @@ def getDevices(self):
else:
if (sID in self.devIDs):
dev = indigo.devices[self.devFromSid[sID]]
devOldName = dev.name
if (dev.name != dName):
dev.name = dName
dev.replaceOnServer()
try:
dev.replaceOnServer()
except ValueError as e:
if (str(e) == "NameNotUniqueError"):
self.debugLog("Trying to rename %s to %s" % (devOldName,dName))
self.debugLog("Failed to rename - duplicate device found - please ensure Sense devices are all uniquely named")
else:
self.errorLog(e)
if (str(sID) in self.rt.keys()):
dev.updateStateOnServer(key='power', value=str(self.rt[sID]), uiValue=str("{} w".format(self.rt[sID])))
dev.updateStateImageOnServer(indigo.kStateImageSel.PowerOn)
Expand Down

0 comments on commit 852fb5c

Please sign in to comment.