#NEWLINE# def seen( self , host_name = None , location_name = None , gps = None , gps_accuracy = 0 , battery = None ) : #NEWLINE# #INDENT# 'Mark the device as seen.' #NEWLINE# self . last_seen = dt_util . utcnow ( ) #NEWLINE# self . host_name = host_name #NEWLINE# self . location_name = location_name #NEWLINE# self . gps_accuracy = ( gps_accuracy or 0 ) #NEWLINE# self . battery = battery #NEWLINE# if ( gps is None ) : #NEWLINE# #INDENT# self . gps = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . gps = tuple ( ( float ( val ) for val in gps ) ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# _LOGGER . warning ( 'Could not parse gps value for %s: %s' , self . dev_id , gps ) #NEWLINE# self . gps = None #NEWLINE# #UNINDENT# #UNINDENT# self . update ( )