diff --git a/custom_components/xiaomi_gateway3/core/gateway3.py b/custom_components/xiaomi_gateway3/core/gateway3.py index 5cbc9a02..6830c654 100644 --- a/custom_components/xiaomi_gateway3/core/gateway3.py +++ b/custom_components/xiaomi_gateway3/core/gateway3.py @@ -549,11 +549,14 @@ def process_gw_message(self, payload: dict): return if 'networkUp' in payload: - payload = { - 'network_pan_id': payload['networkPanId'], - 'radio_tx_power': payload['radioTxPower'], - 'radio_channel': payload['radioChannel'], - } + try: + payload = { + 'network_pan_id': payload['networkPanId'], + 'radio_tx_power': payload['radioTxPower'], + 'radio_channel': payload['radioChannel'], + } + except: + _LOGGER.warning(f"Wrong gw payload: {payload}") elif 'online' in payload: self.device['online'] = payload['online']