Fixing the Automatic Chamber Vent
The auto chamber vent works and props by the way to @Jürgen for coming up with the original idea. However, Prusa's implementation has issues. For starters, the vent is only opened or closed when the filament is changed and during an initial print. Subsequent prints do not open (or close) the chamber. This can be a problem, if say for example, you run PLA and accidentally close the vent between prints. The follow g-code modification with automatically open or close the vent on every print regardless of the vent state and close the vent at the end of the print. For reference the new M code M870 O opens the vent and M870 C closes the vent. If you find these commands doing the opposite, i.e. O instead closes the vent, make sure the grill was turned over when reinstalling it. The knob that move the vent (not sure what to call it) has to be over a closed slot, not an open slot.
Add the following to the Start G-code section between the G28 and chamber temp section g-code
G28 ; home all without mesh bed level
M870 {if filament_type[initial_tool] =~ /.*(PLA|PETG|FLEX).*/}O{else}C{endif} ; Open vent for low temp materials
{if chamber_minimal_temperature[initial_tool]!=0}
Add the following to the End G-code section after the first line
{if layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+1, max_print_height)} F720 ; Move print head up{endif}
M870 C ; close vent
M104 S0 ; turn off temperature