Telnet command called inside an automation

Hi all,
I have a button on my dashboard that turns off my cinema processor. That button comes from a script. I need to include that button or the telnet string on a recently created automation that powers down all the components in the room at the end of each session.

I’ve turned HA upside down and cannot figure out a way to do it. If is there anyone that have already passed through this any help would be appreciated.
T(anks

Scripts are services. So either:

action:
  - service: script.your_script_here

Or

action:
  - service: script.turn_on
    target:
      entity_id: script.your_script_here

The difference between the two is explained here: https://www.home-assistant.io/integrations/script/#waiting-for-script-to-complete