From f035932c7486d239b040f404ab441adfd3485735 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 3 Jun 2020 15:12:23 +0200 Subject: [PATCH] Change BH1750 indexes to I2C address --- tasmota/xsns_10_bh1750.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/xsns_10_bh1750.ino b/tasmota/xsns_10_bh1750.ino index 7af8e3960..2c3c801a7 100644 --- a/tasmota/xsns_10_bh1750.ino +++ b/tasmota/xsns_10_bh1750.ino @@ -170,7 +170,7 @@ void Bh1750Show(bool json) { char sensor_name[10]; strlcpy(sensor_name, Bh1750.types, sizeof(sensor_name)); if (Bh1750.count > 1) { - snprintf_P(sensor_name, sizeof(sensor_name), PSTR("%s%c%d"), sensor_name, IndexSeparator(), sensor_index +1); // BH1750-1 + snprintf_P(sensor_name, sizeof(sensor_name), PSTR("%s%c%02X"), sensor_name, IndexSeparator(), Bh1750_sensors[sensor_index].address); // BH1750-23 } if (json) {