Integration with Gardena Smart Sileno mowers, by using sensors

I had to change the command line template sensor from sections under “sensors” to sensor under command line:

command_line:
  - sensor:
      name: gardena_location
      scan_interval: 86060  # we do no want this to update often, because of API limit 
      command: >-
        curl -X GET -H "Authorization:Bearer {{states.sensor.gardena_token.attributes["access_token"]}}" -H "X-Api-Key:YOURAPIKEY" https://api.smart.gardena.dev/v1/locations
      value_template: '{{ value_json.data[0].id }}'
  - sensor:
      name: gardena_status
      scan_interval: 86000 # Make sure not to exceed 700 calls/week (including commands) or your api-key will be permanently disabled by the provider
      command: >-
        curl -H "Authorization:Bearer {{states.sensor.gardena_token.attributes["access_token"]}}" -H "X-Api-Key:YOURAPIKEY" https://api.smart.gardena.dev/v1/locations/{{states.sensor.gardena_location.state}}
        | jq '{"activity": .included[1].attributes.activity.value, "timestamp": .included[1].attributes.activity.timestamp, "operatingHours": .included[1].attributes.operatingHours.value, "status": .included[1].attributes.state.value, "batteryLevel": .included[2].attributes.batteryLevel.value, "rfLinkLevel": .included[2].attributes.rfLinkLevel.value, "lastErrorCode": (.included[1].attributes.lastErrorCode.value // "none"), "location": .data.id, "serviceId": .included[0].relationships.services.data[0].id}'
      json_attributes:
      - status
      - activity
      - timestamp
      - operatingHours
      - batteryLevel
      - rfLinkLevel
      - lastErrorCode
      - location
      - serviceId
      value_template: '{{ value_json.activity }}'

I can’t get code to work what am I doing wrong??

end of the stream or a document separator is expected (24:1)

21 | curl -X GET -H "Authoriza …
22 | value_template: '{{ value_j …
23 |
24 | command_line:
------^
25 | - sensor:
26 | name: gardena_location