Recorder configuration - exclude all device entities, then include a few?

Hi all, I’ve been reading up on the recorder documentation, yet I’m still in doubt:

Is it possible to do exclude all entities for a device with a glob and then include/open up for only a few specific sensors from said device? The use case is I’m using the Moonraker integration for my 3D printer and it provides at least two dozen sensors, which for the most part there is no need to record, but there’s a few I’d like to keep track of.

As an analog if this was a firewall, my first rule would be deny all, then open up for the individual ports.

exclude:
  entity_globs:
    - sensor.cr_m4_*

include:
  entities:
    - sensor.cr_m4_print_time_left
    - sensor.cr_m4_progress

Is this possible or will the include simply stop recording any other entities across HA than the two listed above?

Thanks!

From the recorder docs, I think that will work.

Number 5 under Configure Filter says:

Domain and/or glob excludes (no domain and/or glob includes)

    Entity listed in entities include: include
    Otherwise, entity listed in exclude: exclude
    Otherwise, entity matches glob exclude: exclude
    Otherwise, entity matches domain exclude: exclude
    Otherwise: include