The command_line sensor isn't working

Hi, I can’t get a command_line sensor to work. I created it like this:

  - platform: command_line
    name: "Lista report split"
    unique_id: lista_report_split
    command: >
      ls -1 /config/www/reports/*.txt 2>&1 || echo "errore_ls"

But it doesn’t appear in the status list and doesn’t report any errors. Can anyone help me? Thanks.

You are using old syntax that won’t work with newer versions of home assistant