Skip to content

Commit

Permalink
0.8.1
Browse files Browse the repository at this point in the history
Zoom for other non-google maps can be any size
Fix for error with first run with new device states
Fix for address not given NoneType error
  • Loading branch information
ghawken committed May 7, 2018
1 parent 993865c commit 5d9ac6c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions iFindFriendsMini.indigoPlugin/Contents/Server Plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,10 @@ def closedPrefsConfigUi(self, valuesDict, userCancelled):

def deviceStartComm(self, dev):
""" docstring placeholder """


self.logger.debug(u"deviceStartComm() method called.")
self.logger.debug(u'Starting FindFriendsMini device: '+unicode(dev.name)+' and dev.id:'+unicode(dev.id)+ ' and dev.type:'+unicode(dev.deviceTypeId))
# Update statelist in case any updates/changes
dev.stateListOrDisplayStateIdChanged()

if dev.deviceTypeId=='FindFriendsGeofence':
stateList = [
Expand Down Expand Up @@ -411,8 +411,6 @@ def deviceStartComm(self, dev):
dev.updateStatesOnServer(stateList)

self.prefsUpdated = True
# Update statelist in case any updates/changes
dev.stateListOrDisplayStateIdChanged()
dev.updateStateOnServer('deviceIsOnline', value=False, uiValue="Waiting")
dev.updateStateImageOnServer(indigo.kStateImageSel.SensorOff)

Expand Down Expand Up @@ -1096,9 +1094,10 @@ def refreshDataForDev(self, dev, follow):
# Create stateList ? need better checking that exists
#
address =""
if 'formattedAddressLines' in follow['location']['address']:
address = ','.join(follow['location']['address']['formattedAddressLines'])
elif 'address' in follow['location']:

if 'address' in follow['location']:
if 'formattedAddressLines' in follow['location']['address']:
address = ','.join(follow['location']['address']['formattedAddressLines'])
if 'streetAddress' in follow['location']['address']:
address = follow['location']['address']['streetAddress']
if 'locality' in follow['location']['address']:
Expand Down

0 comments on commit 5d9ac6c

Please sign in to comment.