From f106eb33241facb7af06946fb51c2fc80918e8c1 Mon Sep 17 00:00:00 2001 From: Pedro Ribeiro Date: Thu, 17 Jul 2025 18:46:22 +0100 Subject: [PATCH] Fix misdetection of current generation TSL2591 (#23699) * Update xsns_11_veml6070.ino in Veml6070Detect check for the presence of both addresses in the bus to avoid misdetection of ATH20/21 (anyone with the device, please confirm this change still detect the device when present) * Update xsns_16_tsl2561.ino check the correct ID was returned to avoid misdetection of other sensors. * Update xsns_57_tsl2591.ino - report channel values in JSON as in TSL2561 Add the raw infrared and broadband channels of the sensor to the JSON report like is done in the driver for TSL2561 * Update xsns_57_tsl2591.ino Fix var name * Update xsns_57_tsl2591.ino Fix variable name * Fix to correctly detect all known chip versions Fix do deal with the current generation of the chip that returns 5 is ID --- tasmota/tasmota_xsns_sensor/xsns_16_tsl2561.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota_xsns_sensor/xsns_16_tsl2561.ino b/tasmota/tasmota_xsns_sensor/xsns_16_tsl2561.ino index 151d73938..e0a2617be 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_16_tsl2561.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_16_tsl2561.ino @@ -75,7 +75,8 @@ void Tsl2561Detect(void) if (!Tsl.id(id)) return; // check the correct ID was returned // datasheet says reg 0xA (ID) returns 0x1r (r = nibble revision) - if ((id & 0xF0) != 0x10) return; + // current version returns 0x5r + if ((id & 0xF0) != 0x10 && (id & 0xF0) != 0x50) return; if (Tsl.on()) { tsl2561_type = 1; I2cSetActiveFound(Tsl.address(), tsl2561_types);