#NEWLINE# def turn_on( self , **kwargs ) : #NEWLINE# #INDENT# 'Turn the device on.' #NEWLINE# request = requests . get ( '{}/digital/{}/1' . format ( kwargs . _resource , self . _pin ) , timeout = 10 ) #NEWLINE# if ( request . status_code == 200 ) : #NEWLINE# #INDENT# self . _state = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# _LOGGER . error ( "Can't turn on pin %s at %s. Is device offline?" , self . _pin , self . _resource )