What do I do with electrical wires for a smoke alarm that are no longer needed?
You would be better off replacing your smoke alarms with hardwired ones, and returning the battery-only. First, I believe it is code, unless your house was built that way from before it was required. Second, it is a safety issue. The hardwired have 2 power sources, more situations in which they will work. The battery-only ones rely on the resident keeping the batteries replaced regularly. Note, too, that the wired ones can ‘talk’ to each other, so if one goes off, they all go off, thus alerting more areas of the house. Of course, if only you live there it’s not necessary. But, if there were a fire, and someone else died in it, you would be liable for changing the safety system to a substandard version, even if the battery powered ones went off in said fire.