Skip to content

Commit

Permalink
workaround for voluptuous 0.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdavb committed Aug 17, 2024
1 parent 24cb54b commit f21b66b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ramses_rf/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,13 @@ def check_filter_lists(dev_id: DeviceIdT) -> None: # may: LookupError
dev = self.device_by_id.get(device_id)

if not dev:
# voluptuous bug workaround: https://github.com/alecthomas/voluptuous/pull/524
_traits = self._include.get(device_id, {})
_traits.pop("commands", None)

traits: dict[str, Any] = SCH_TRAITS(self._include.get(device_id, {}))

dev = device_factory(self, Address(device_id), msg=msg, **traits)
dev = device_factory(self, Address(device_id), msg=msg, **_traits)

if traits.get(SZ_FAKED):
if isinstance(dev, Fakeable):
Expand Down

0 comments on commit f21b66b

Please sign in to comment.