Browse Source

use type instead of "switch"

rules-rpn
abmantis 5 years ago
parent
commit
490fb21636
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      code/espurna/homeassistant.ino

+ 1
- 1
code/espurna/homeassistant.ino View File

@ -137,7 +137,7 @@ void _haSendSwitches(const JsonObject& deviceConfig) {
DynamicJsonBuffer jsonBuffer; DynamicJsonBuffer jsonBuffer;
JsonObject& config = jsonBuffer.createObject(); JsonObject& config = jsonBuffer.createObject();
_haSendSwitch(i, config); _haSendSwitch(i, config);
config["uniq_id"] = getIdentifier() + "_switch_" + String(i);
config["uniq_id"] = getIdentifier() + "_" + type + "_" + String(i);
config["device"] = deviceConfig; config["device"] = deviceConfig;
config.printTo(output); config.printTo(output);


Loading…
Cancel
Save