From cf03f160e5f2ac083a38f47b4b9f80ddf4a8c98e Mon Sep 17 00:00:00 2001 From: Thierry DUVERNOY Date: Sun, 26 Jan 2025 18:49:50 +0100 Subject: [PATCH] Adding DS2413, DS2406 and DS2408 to known 1-wire components --- esphome/components/one_wire/one_wire_bus.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/esphome/components/one_wire/one_wire_bus.cpp b/esphome/components/one_wire/one_wire_bus.cpp index a8d29428d3..2fc0e5d124 100644 --- a/esphome/components/one_wire/one_wire_bus.cpp +++ b/esphome/components/one_wire/one_wire_bus.cpp @@ -11,6 +11,9 @@ static const uint8_t DALLAS_MODEL_DS1822 = 0x22; static const uint8_t DALLAS_MODEL_DS18B20 = 0x28; static const uint8_t DALLAS_MODEL_DS1825 = 0x3B; static const uint8_t DALLAS_MODEL_DS28EA00 = 0x42; +static const uint8_t DALLAS_MODEL_DS2413 = 0xBA; +static const uint8_t DALLAS_MODEL_DS2406 = 0x12; +static const uint8_t DALLAS_MODEL_DS2408 = 0x29; const uint8_t ONE_WIRE_ROM_SELECT = 0x55; const uint8_t ONE_WIRE_ROM_SEARCH = 0xF0; @@ -68,6 +71,12 @@ const LogString *OneWireBus::get_model_str(uint8_t model) { return LOG_STR("DS1825"); case DALLAS_MODEL_DS28EA00: return LOG_STR("DS28EA00"); + case DALLAS_MODEL_DS2413: + return LOG_STR("DS2413"); + case DALLAS_MODEL_DS2406: + return LOG_STR("DS2406"); + case DALLAS_MODEL_DS2408: + return LOG_STR("DS2408"); default: return LOG_STR("Unknown"); }