To put it bluntly, David's son Amnon had developed a romantic crush on Tamar, his half-sister. The temptation to do something wrong is not itself sinful. Not even the initial desire to do something illicit is wrong.
Sin enters the picture, and is conceived, when the desire is unchecked and unchallenged.
He had a good plan by which Amnon could indulge his sexual passion. Satan will see to it that when we are at a fork in the road there is a Jonadab by our side. We need to be cautious lest we mistakenly listen to devils. He who flirts with his temptations will be consumed by them. He who by God's power checks them will go on from grace to grace.