From 490fb21636a00366d7d18a948aee267e828e6dc1 Mon Sep 17 00:00:00 2001 From: abmantis Date: Sun, 17 Feb 2019 01:26:45 +0000 Subject: [PATCH] use type instead of "switch" --- code/espurna/homeassistant.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);