Confirmation of lock opening, added in the HA 2024.2 update

Lock behavior improvements
Some smart locks have an open (or unlatching) mechanism that can be triggered remotely. The door either pops out of the lock or can be opened by pushing against the door.
We want to ensure you don’t accidentally open the door when you miss-clicked the button (for example, while not at home :grimacing:). Therefore, we have improved the behavior of locks in our user interface by requiring you to confirm the action.
Screen recording showing the confirmation in the UI when unlatching/opening a door.

As far as I understand, this cannot be implemented through the “lock” integration or by changing the switch type from switch to lock. My lock is controlled via an ESP8266 through the ESPHome add-on. Can I use this function by modifying the ESP firmware?

If so, how?