diff --git a/hahomematic/central/__init__.py b/hahomematic/central/__init__.py index 4ef2f702..b48338c7 100644 --- a/hahomematic/central/__init__.py +++ b/hahomematic/central/__init__.py @@ -1049,18 +1049,20 @@ def get_parameters( p_operations = paramset[Description.OPERATIONS] for operation in operations: if all(p_operations & operation for operation in operations): - if ( - un_ignore_candidates_only - and ( - generic_entity := self.get_generic_entity( - channel_address=channel_address, - parameter=parameter, - paramset_key=paramset_key, + if un_ignore_candidates_only and ( + ( + ( + generic_entity := self.get_generic_entity( + channel_address=channel_address, + parameter=parameter, + paramset_key=paramset_key, + ) ) + and generic_entity.enabled_default + and not generic_entity.is_un_ignored ) - and generic_entity.enabled_default - and not generic_entity.is_un_ignored - ) or parameter in IGNORE_FOR_UN_IGNORE_PARAMETERS: + or parameter in IGNORE_FOR_UN_IGNORE_PARAMETERS + ): continue parameters.add( f"{parameter}@{device_type}:{get_channel_no(channel_address)}:{paramset_key}" diff --git a/tests/test_central.py b/tests/test_central.py index d58dcdcf..7d3c9952 100644 --- a/tests/test_central.py +++ b/tests/test_central.py @@ -420,9 +420,9 @@ async def test_ignore_device_type( ), [ ((Operations.READ, Operations.EVENT), True, True, 43), - ((Operations.READ, Operations.EVENT), True, False, 55), + ((Operations.READ, Operations.EVENT), True, False, 57), ((Operations.READ, Operations.EVENT), False, True, 31), - ((Operations.READ, Operations.EVENT), False, False, 41), + ((Operations.READ, Operations.EVENT), False, False, 43), ], ) async def test_all_parameters( @@ -454,9 +454,9 @@ async def test_all_parameters( ), [ ((Operations.READ, Operations.EVENT), True, True, 44), - ((Operations.READ, Operations.EVENT), True, False, 55), + ((Operations.READ, Operations.EVENT), True, False, 57), ((Operations.READ, Operations.EVENT), False, True, 31), - ((Operations.READ, Operations.EVENT), False, False, 41), + ((Operations.READ, Operations.EVENT), False, False, 43), ], ) async def test_all_parameters_with_un_ignore(