In 2003 Rhineland-Palatinate changed its state building code to require smoke alarms in homes. The other states followed one by one. Berlin was the last, on 9 June 2016. Its rule applied to new and converted buildings from 2017, with a transition period for existing homes until 2020. From then on, the duty was written into the building law of all 16 states. At that time Saxony was the only state without a duty for existing apartments.