Binary_sensor open/close instead of on/off

So, in 2023 (almost there) - where would this yaml code go?