diff --git a/code/espurna/homeassistant.ino b/code/espurna/homeassistant.ino index 2c83942a..a3892bce 100644 --- a/code/espurna/homeassistant.ino +++ b/code/espurna/homeassistant.ino @@ -137,7 +137,7 @@ void _haSendSwitches(const JsonObject& deviceConfig) { DynamicJsonBuffer jsonBuffer; JsonObject& config = jsonBuffer.createObject(); _haSendSwitch(i, config); - config["uniq_id"] = getIdentifier() + "_switch_" + String(i); + config["uniq_id"] = getIdentifier() + "_" + type + "_" + String(i); config["device"] = deviceConfig; config.printTo(output);