diff --git a/main/mqttDiscovery.cpp b/main/mqttDiscovery.cpp index 2f064cf3..9f9b008a 100644 --- a/main/mqttDiscovery.cpp +++ b/main/mqttDiscovery.cpp @@ -593,7 +593,7 @@ void createDiscovery(const char* sensor_type, } } - device["via_device"] = String(gateway_name); //device name of the board + device["via_device"] = String(getMacAddress()); //mac address of the gateway so that the devices link to the gateway } sensor["device"] = device;