Turn off Broadlink RM mini if idle

please help me. i want turn off Broadlink RM mini if idle after 5 minutes.
This is my code, when I press on then after 5 minutes RM3 mini turns off, but when i send_command, automation doesn’t restart the 5 minute counter

- alias: Turn off RM3 mini remote after 5 minutes
  mode: restart
  trigger:
  - platform: event
    event_type: call_service
    event_data:
      domain: remote
      service: send_command
    #for: '00:00:30'
  trigger:
  - platform: state
    entity_id: remote.rm3_mini_remote
    to: 'on' 
  condition:
  - condition: state
    entity_id: remote.rm3_mini_remote  
    state: 'on'  
  action:
  - delay: "05:00"
  - service: remote.turn_off
    entity_id: remote.rm3_mini_remote 

Hello. The on/off button doesn’t have the behavior you expect. This device cannot be turned off by command. This button only serves to disable the interface in case you want to configure linked entities without sending the code (adjust a volume slider or change a state, for example).