The actor who played the grandfather on the made-in-Utah Disney Channel series “Andi Mack” has been charged with six felonies after he allegedly tried to set up a sexual encounter with a person he believed to be a 13-year-old boy.

Stoney Westmoreland, 48, of Los Angeles, was fired by Disney after his arrest on Dec. 13.

According to court documents, Westmoreland began chatting online with a detective who was posing as a 13-year-old, and “asked if he would come to his hotel room and engage in sexual activity.” The actor also sent three pictures of male genitalia and one of men having sex.

After being read his rights, Westmoreland “admitted to sending nude photos, and that the male who he was speaking with told him he was 13 years old.” He has been charged with attempted sexual exploitation of a minor, a third-degree felony; enticing a minor, a second-degree felony; and four counts of dealing in harmful material to a minor, a third-degree felony, in 3rd District Court.

“Andi Mack” is filmed in and around Salt Lake City and Magna. It centers on a 13-year-girl (Peyton Elizabeth Lee) who, as the series began in April 2017, learns that the couple (Lauren Tom and Westmoreland) she had believed were her parents are actually her grandparents, and that her older “sister” (Lilan Bowden) is actually her biological mother.

Westmoreland appeared in 38 of the 58 episodes produced to date; 44 have aired. Disney has not announced whether unaired episodes in which he appears will be edited, or what will become of his character, Ham Mack.

“Andi Mack” has proven to be a big success for the Disney Channel; it is TV’s most-watched show among girls and among all viewers ages 9-14. It is scheduled to return to the schedule on Friday, Jan. 18.