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