diff --git a/Modules/pluginModels.py b/Modules/pluginModels.py index bd8fd7e6d..1c9ec6485 100644 --- a/Modules/pluginModels.py +++ b/Modules/pluginModels.py @@ -38,11 +38,11 @@ def plugin_self_identifier( self, model, manufacturer): def check_found_plugin_model( self, model, manufacturer_name=None, manufacturer_code=None, device_id=None): - self.log.logging( "Pairing", "Debug", "check_found_plugin_model - %s %s %s %s" % ( - model, manufacturer_name, manufacturer_code, device_id)) + self.log.logging( "Pairing", "Debug", f"check_found_plugin_model - model={model}, manufacturer_name={manufacturer_name}, manufacturer_code={manufacturer_code}, device_id={device_id}") - if device_id == {}: - device_id = None + device_id = None if device_id == {} else device_id + manufacturer_name = None if manufacturer_name == {} else manufacturer_name + manufacturer_code = None if manufacturer_code == {} else manufacturer_code # Let's check if for x in PLUGIN_MODELS_MATRIX: diff --git a/Modules/readClusters.py b/Modules/readClusters.py index b711f8872..c6f7d0987 100644 --- a/Modules/readClusters.py +++ b/Modules/readClusters.py @@ -29,7 +29,6 @@ decode_vibrAngle, readLumiLock, readXiaomiCluster, store_lumi_attribute) from Modules.philips import philips_dimmer_switch -from Modules.pluginModels import check_found_plugin_model from Modules.readZclClusters import (is_cluster_zcl_config_available, process_cluster_attribute_response) from Modules.schneider_wiser import (receiving_heatingdemand_attribute, diff --git a/Modules/zclClusterHelpers.py b/Modules/zclClusterHelpers.py index 4115d1a56..4747128c7 100644 --- a/Modules/zclClusterHelpers.py +++ b/Modules/zclClusterHelpers.py @@ -277,11 +277,17 @@ def _upd_data_strut_based_on_model(self, MsgSrcAddr, modelName, initial_ep): def _build_model_name( self, nwkid, modelName): - + + self.log.logging([ "ZclClusters", "Pairing"], "Debug", f"_build_model_name {modelName}", nwkid) + manufacturer_name = self.ListOfDevices[nwkid].get("Manufacturer Name", "") manuf_code = self.ListOfDevices[nwkid].get("Manufacturer", "") zdevice_id = self.ListOfDevices[nwkid].get("ZDeviceID", None) + self.log.logging([ "ZclClusters", "Pairing"], "Debug", f"_build_model_name manufacturer_name: {manufacturer_name}", nwkid) + self.log.logging([ "ZclClusters", "Pairing"], "Debug", f"_build_model_name manuf_code: {manuf_code}", nwkid) + self.log.logging([ "ZclClusters", "Pairing"], "Debug", f"_build_model_name zdevice_id: {zdevice_id}", nwkid) + if modelName in ( '66666', ): # https://github.com/Koenkk/zigbee2mqtt/issues/4338 return check_found_plugin_model( self, modelName, manufacturer_name=manufacturer_name, manufacturer_code=manuf_code, device_id=zdevice_id)