Skip to content

Commit

Permalink
make omitting manufacturer and model data optional
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey committed Oct 4, 2024
1 parent 7226207 commit 3dacd13
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions zigpy/quirks/v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,11 +892,12 @@ def add_to_registry(self) -> QuirksV2RegistryEntry:

return quirk

def clone(self) -> QuirkBuilder:
"""Clone this QuirkBuilder omitting manufacturer and model data."""
def clone(self, omit_man_model_data=True) -> QuirkBuilder:
"""Clone this QuirkBuilder potentially omitting manufacturer and model data."""
new_builder = deepcopy(self)
new_builder.registry = self.registry
new_builder.manufacturer_model_metadata = []
if omit_man_model_data:
new_builder.manufacturer_model_metadata = []
return new_builder


Expand Down

0 comments on commit 3dacd13

Please # to comment.