Logbook only captures script called within automation

Hi.

I need help pls with an automation that is not captured in logbook.

Logbook captures automations fine except for one. This automation calls a script that converts seconds to a friendly time. This code is called often so it is kept in a script:

            - service: script.friendly_time_from_seconds_script
              data:
                timeInSeconds: >-
                  {{ ( as_timestamp(now())| int ) - (as_timestamp(states('input_datetime.time_left_house')) | int ) }}
              response_variable: friendlyTime
            - service: input_text.set_value
              target:
                entity_id: input_text.sms_message
              data:
                value: >-
                  You were out for {{ friendlyTime.value }}.

In logbook only the step details for the “script.friendly_time_from_seconds_script” script is captured. The automation that calls it (that I want to debug) does not appear.
If I remove the service calling the script above, then the calling script is captured in logbook.

Post the debug trace.

I manually ran the “House no longer Empty” automation at 8:47:44 AM
Screen grab from logbook:

When I click the entry at the bottom I get:

This only shows info from the “script.friendly_time_from_seconds_script” that is called and not the main automation “House no longer Empty”.

Any ideas on what is causing this?