TALLAHASSEE, Fla. — Gov. Rick Scott signed legislation Monday requiring backup power sources in Florida nursing homes and assisted living facilities, months after the deaths of several residents from a sweltering nursing home that lost power in a hurricane.

The legislation require the facilities to have a generator capable of keeping nursing homes and assisted living facilities at 81 degrees Fahrenheit (27 degrees Celsius) or lower for at least four days. All of Florida’s 685 nursing homes and 3,089 assisted living facilities must be in compliance by the June 1 start of hurricane season. State agencies can grant an extension until Jan. 1, 2019, for facilities that would face delays in installing equipment or need zoning or other regulatory approval.

“As we near hurricane season, families can now know the facilities responsible for caring for their loved ones will have the resources needed to be fully prepared ahead of any potential storms,” Scott said in a statement.

Officials from the state’s Agency for Health Care Administration, which oversees nursing homes, and the Department of Elder Affairs, which regulates assisted living facilities, did not have updated numbers on how many facilities were already in compliance. As of January, 108 nursing homes and 138 assisted living facilities had installed the necessary equipment.

“Florida faces an annual risk from Mother Nature, and these rules will help keep seniors safe during a possible devastating weather event or … prolonged power outage,” said Justin Senior, secretary of the Agency for Health Care Administration.

The rule was originally issued by Scott, Florida’s Agency for Health Care Administration and the Department of Elder Affairs following the deaths at the Hollywood Hills Rehabilitation Center after Hurricane Irma in September. The original rule stated that nursing homes and assisted living facilities had to be in compliance by Nov. 15 or face a fine of $1,000 per day. But a state administrative judge sided last October with nursing homes that had challenged the tight deadlines.

In January, state nursing homes agreed to the revised rules. The rules also now take into consideration that assisted living facilities are licensed differently based on number of beds.

The original rules mandated 50 square feet (4.6 square meters) per resident needed to be kept cool but it has been lowered to 30 square feet (2.7 square meters) for nursing homes and 20 square feet (1.8 square meters) for assisted living facilities. While nursing homes need 96 hours of fuel on site during a weather emergency, the hours vary for assisted living facilities from 48 hours for facilities with 16 beds or less to 72 hours for those with 17 or more beds.

State officials estimate it will cost nearly $430 million for facilities to comply.

Legislators though during the recently concluded session agreed to waive sales taxes up to $15,000 for facilities that still haven’t purchased generators or did so after July 1, 2017.