If there's a fire, your insurance company will likely be able to escape issuing a payout if they discover you knowingly brought about a fire code violation.
I would actually do this, but use Home Depot smoke alarms that are up to code as well. The custom smoke alarm would only be for the sake of alerting me remotely or something.