#NEWLINE# def test_is_on( self ) : #NEWLINE# #INDENT# 'Test is_on method.' #NEWLINE# entity_id = device_tracker . ENTITY_ID_FORMAT . format ( 'test' ) #NEWLINE# self . hass . states . set ( entity_id , STATE_HOME ) #NEWLINE# self . assertTrue ( device_tracker . is_on ( self . hass , entity_id ) ) #NEWLINE# self . hass . states . set ( entity_id , STATE_NOT_HOME ) #NEWLINE# self . assertFalse ( device_tracker . is_on ( self . hass , entity_id ) )