What is the difference between service_template and service in automation?

hi, who can tell me, service_template and service. What is the difference between them? thanks.

  - service_template: >
      {{ 'switch.turn_off' if states('sensor.time') > '22:30' }}
    entity_id:
    - switch.sonoff_100117
  - service: >
      {{ 'switch.turn_off' if states('sensor.time') > '22:30' }}
    entity_id:
    - switch.sonoff_100117

Service_template is previously needed if you want to use template, however an update last year makes it unnecessary to use service_template. You just need service:

Frenck explained “This PR removes the need for service_template & data_template in service and event actions. Instead, service & data now accept templates.”

thanks you.

That solved the puzzle I had, in an automation of my xmas lights in the house. The automation did not return an error but it was with a service_template and it the if then else functioned but no light was turned on. Now I finally changed the template in just service and they worked. Had I seen this little snippet of value information sooner lolz well it would have saved me hours of trying to figure this out.

Thank you valuable information.