In simple terms, yes. However, the requirements are different for each state of Australia and New Zealand.
All Australian homes must have at least one working smoke alarm installed on each level of the residence. New homes are required to have mains-powered alarms installed by a qualified electrician.
It is recommended that you check your state legislation to ensure you are meeting the appropriate guidelines.