The D.C. City Council Tuesday enacted legislation requiring the installation of smoke detectors in all existing new homes, duplexes and apartments, hotels, motels, hospitals, nursing homes, jails, prisons and residential-custodial care facilities in the city.

The amended legislation passed 6 to 4 in a roll call vote, minutes after it escaped being tabled by one vote. Councilwoman Hilda Mason proposed tabling the legislation after council members rejected two substitute amendments that would have banned the use of one type of smoke detector that contains a radioactive element which some groups have alleged to be harmful.

Under the enacted legislation, the D.C. Fire Department has the responsiblity to hold a public hearing within 40 days after the effective date of the smoke detector act to consider any potential radiological danger presented by either of two types of smoke detector - the ionization type or the photoelectric type. This would have to be accomplished before any type of smoke detector could be approved by the Fire Department.

The legislation now must be reviewed by the Mayor and then by Congress, which usually takes about two months, before it can become law.

The bill requires owners of existing residences to install smoke detectors within three years of the time the legislation takes effect. Owners of homes and facilities which are constructed or substantially rehabilitated under a building permit issued after Sept. 30 would have to install smoke detectors. The District of Columbia would have two years to provide smoke detectors in facilities it owns and operates.

At least one smoke detector would have to be installed in each sleeping area of residences. Owners would be required to install the smoke detector outside the bedrooms but in the immediate vicinity of the sleeping area. The legislation also sets down requirements for where the detectors must be placed on other facilities.

In new residences, the smoke detectors would have to be wired directly to the power supply of the building

In existing residences, or those substantially rehabilitated or constructed under a building permit issued before Oct. 1, the owner could install a smoke detector that operates from a plug-in outlet. The owner would also have the option of using the direct-wired type detector.

Only in existing single-family homes, including those substantially rehabilitated, could owners choose to use either the direct-wired, plug-in type or monitored, battery-powered smoke detectors. The monitored, battery-powered detector emits a signal when run-down batteries need replacement.

No owner may permanently wire a smoke detector to the electrical system of a structure without first getting an electrical permit from the city, according to the legislation. Owners are responsible for maintaining smoke detectors in operating condition and periodically testing the units to make sure they work.

Smoke detectors range in price from about $20 to $45, depending on the model, according to Fire Marshal John P. Breen of the D. C. Fire Department. Breen said "it is safe to assume" that the cost will decrease with rising production increases.

Council members voting to approve the legislation were David A. Clarke, Arrington L. Dixon, Douglas E. Moore, Wilhelmina J. Rolark, Polly Shackleton and Sterling Tucker. Those who opposed it were Hilda Mason, Jerry A. Moore Jr., William Spaulding and John A. Wilson. Marion S. Barry Jr. and Nadine Winter voted present, and Willie J. Hardy was absent.