Federal Law Supersedes State Law. While a municipality can write local laws they can be stricter than the State law (as long as they do not run counter to the State or U.S. Constitution) But cannot contradict state law.
Finally, is an HOA considered a local government? No—HOAs are not considered a local government entity. While they do hold some administrative functions for a community, such as collecting assessments and enforcing rules, they do not possess the authority granted to real government bodies.
Homeowners often ask whether local laws supersede the rules and regulations set forth by their homeowner association (HOA). The short answer is yes, local laws do supersede HOA rules.
Generally, it is the laws that were in effect at the time the HOA documents were recorded. Your HOA documents are contracts between the HOA and its members so new laws cannot, generally, be applied retroactively to override them.