Command Line Sensor invalid options (automatic_add, resources, display_options, sensors)

Hi all,
I have been following instructions for changing the Sensor to command_line.

most of what I have change works with the exception of the below. I know there must be some simple change I need to make however, in all my searches, I am not able to see these specific errors.

  1. [automatic_add] is an invalid option for [command_line]
  2. [resources] is an invalid option for [command_line]
  3. [display_options] is an invalid option for [command_line]
  4. [sensors] is an invalid option for [command_line]

I know they all must relate to a similar fix but need help/ pointing at the website I need to fix this. Any ideas please?

My code is below: -

in configuration.yaml
command_line: !include 001-sensor.yaml

then in sensor.yaml

  - sensor:
      name: "rflink"
      automatic_add: true #[automatic_add] is an invalid option for [command_line].####################

  - sensor:
      name: "systemmonitor"
      resources:  #[resources] is an invalid option for [command_line].####################
        - type: disk_use_percent
          arg: /home
        - type: memory_use_percent
        - type: processor_use
        - type: last_boot
        - type: load_1m
        - type: load_5m
        - type: load_15m
        - type: network_in
          arg: eth0
        - type: network_out
          arg: eth0

  - sensor:
      name: "time_date"
      display_options: # [display_options] is an invalid option for [command_line].#############
        - 'date_time_iso'

  - sensor:
      name: "template"
      sensors: # [sensors] is an invalid option for [command_line].#############
        apc_output_watt:
          friendly_name: "APC Output Watt"
          unit_of_measurement: 'W'
          value_template: "{{ states('sensor.apc1500_output_current')|float * states('sensor.apc1500_output_voltage')|float }}"

  - sensor:
      name: "template"
      sensors: # [sensors] is an invalid option for [command_line].#############
        local_wether_temp:
          friendly_name: "Local Temperature"
          unit_of_measurement: '°C'
          value_template: "{{ state_attr('weather.home', 'temperature') }}"


You only need to change the sensors that have

platform: command_line

Leave all the others as they are.

1 Like

Thank you. if there is a way an end user can break/ misinterpret something, I will find it.