How to pass entity_id to command (command_line switch)?

Hi,

I have command_line switch, and it works as it should.

switch:
  - platform: command_line
    switches:
      switch001:
        command_on: 'python3 set_state.py switch.switch001 on'
        command_off: 'python3 get_state.py switch.switch001 off'
        command_state: 'python3 get_state.py switch.switch001'
        value_template: '{{ value_json is defined and value_json.state == "on" }}'
        friendly_name: Switch001

Is there a way to pass entity_id to command automatically? (without typing unique ids)
Something like that:

command_on: 'python3 set_state.py {{ self.entity_id }} on'
command_off: 'python3 get_state.py {{ self.entity_id }} off'
command_state: 'python3 get_state.py {{ self.entity_id }}'

This is necessary in case 10++ switches.

Thank you guys!