Fixed ESP32 build

This commit is contained in:
Gunnar Skjold
2022-02-12 11:52:06 +01:00
parent 0700d22d43
commit 47dda366e3

View File

@@ -205,7 +205,11 @@ bool HomeAssistantMqttHandler::publishSystem(HwTools* hw) {
}
if(!autodiscoverInit) {
String haUID = WiFi.hostname(); // unit identity (wifi hostname)
#if defined(ESP8266)
String haUID = WiFi.hostname();
#elif defined(ESP32)
String haUID = WiFi.getHostname();
#endif
String haUrl = "http://" + haUID + ".local/";
for(int i=0;i<sensors;i++){