mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-04 10:19:29 +02:00
Fixing battery 2 unique_id
This commit is contained in:
parent
602242a661
commit
3124656668
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ void set_battery_voltage_attributes(JsonDocument& doc, int i, int cellNumber, co
|
||||||
const String& object_id_prefix, const String& battery_name_suffix) {
|
const String& object_id_prefix, const String& battery_name_suffix) {
|
||||||
doc["name"] = "Battery" + battery_name_suffix + " Cell Voltage " + String(cellNumber);
|
doc["name"] = "Battery" + battery_name_suffix + " Cell Voltage " + String(cellNumber);
|
||||||
doc["object_id"] = object_id_prefix + "battery_voltage_cell" + String(cellNumber);
|
doc["object_id"] = object_id_prefix + "battery_voltage_cell" + String(cellNumber);
|
||||||
doc["unique_id"] = topic_name + "_battery_voltage_cell" + String(cellNumber);
|
doc["unique_id"] = topic_name + object_id_prefix + "_battery_voltage_cell" + String(cellNumber);
|
||||||
doc["device_class"] = "voltage";
|
doc["device_class"] = "voltage";
|
||||||
doc["state_class"] = "measurement";
|
doc["state_class"] = "measurement";
|
||||||
doc["state_topic"] = state_topic;
|
doc["state_topic"] = state_topic;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue