I solved the problem with this automatic wake-up feature, and it worked 100% by removing the battery for 20 seconds.
alias: Wake-up during sonoff_snzb_02dr2_firmware update
description: ""
triggers:
- trigger: state
entity_id:
- update.sonoff_snzb_02dr2_firmware
attribute: update_percentage
conditions: []
actions:
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- action: button.press
metadata: {}
target:
entity_id: button.sonoff_snzb_02dr2_identifica
data: {}
mode: queued
max: 100