#NEWLINE# def update_state( self , state , value , message = None ) : #NEWLINE# #INDENT# 'Update state of particular event' #NEWLINE# if ( state not in self . STATES ) : #NEWLINE# #INDENT# self . STATES [ state ] = False #NEWLINE# #UNINDENT# if ( value is not self . STATES [ state ] ) : #NEWLINE# #INDENT# _logger . debug ( 'State change - %s: %s' , state , value ) #NEWLINE# #UNINDENT# if ( value and ( not self . STATES [ state ] ) ) : #NEWLINE# #INDENT# self . state_change_callback ( state , message ) #NEWLINE# #UNINDENT# self . STATES [ state ] = value