Skip to content

Commit

Permalink
fixed MultiplyBatteryLevel error message
Browse files Browse the repository at this point in the history
added
if 'MultiplyBatteryLevel' in self.devicesCopy[sensor].pluginProps and ..

to capture missing property
  • Loading branch information
kw123 committed Jun 2, 2018
1 parent c4a9282 commit 46346c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RFXCOM.indigoPlugin/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>2.1.12</string>
<string>2.1.13</string>
<key>ServerApiVersion</key>
<string>2.0.0</string>
<key>IwsApiVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion RFXCOM.indigoPlugin/Contents/Server Plugin/RFXTRX.py
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ def showTemp(self, data):
if sensor in self.devicesCopy.keys():
self.plugin.debugLog(u"Temp sensor %d in list" % sensor)

if self.devicesCopy[sensor].pluginProps['MultiplyBatteryLevel']:
if 'MultiplyBatteryLevel' in self.devicesCopy[sensor].pluginProps and self.devicesCopy[sensor].pluginProps['MultiplyBatteryLevel']:
batteryLevel *= 10
if batteryLevel > 100:
batteryLevel = 100
Expand Down

0 comments on commit 46346c4

Please sign in to comment.