The variable material.entity is available on all entity levels. It is not necessarily integer-valued or even constant on each entity since it is not only affected by material properties and equations on the entity level where it is evaluated, but also by lower levels. For example,
material.entity on the domain level is discontinuous at boundaries where there are equation contributions that can potentially make the solution or important postprocessing variables discontinuous.
The applicable variables (except material.entity) are available for postprocessing under
Model>Material in the lists of predefined quantities for expressions in plots, for example.