Asa did what was right in the eyes of the LORD, as his father David had done. Although he did not remove the high places, Asa's heart was fully committed to the LORD all his life. (1 Kings 15:11, 14 NIV)
Rehoboam, Solomons son, was as bad as Jeroboam in the north. He had idols built and authorized evil worship practices like those of the nations around him. He was always at war with the nations around him. Egypt took much of the wealth his father had amassed. After his death, his son Abijah did just as he had done. Abijahs son Asa, however, feared God. He destroyed the idols in Jerusalem and even deposed the Queen mother who was an idol worshipper. His actions were compared with those of David. He was given wisdom to make alliances that got Israel off his back.
He was given this great testimony, Asa's heart was fully committed to the LORD all his life. He wasnt perfect. He didnt do all that should have been done, but his heart was fully committed to the LORD all the days of his life. There is a contrast here with Solomon, who in his later days turned his heart from the LORD. Asa stayed faithful to the end.
It should encourage us that he didnt get everything right, and yet God honored his heart. God doesnt ask for perfection in our actions. As long as we are mortal we will always fall short. He does look at our hearts and judge where our affections are placed. Too often we focus on our actions being correct and forget that our actions are a result of where we commit our heart. That is the place we need to tune our attention.
You can have this same testimony, a heart fully committed to God all the days of your life. You must decide where you will commit your heart, which affections you will allow. Guard your heart, for out of it are the issues of life.