From 63cce916e2804f8bfe8f1cb66340a151869fcc72 Mon Sep 17 00:00:00 2001 From: Samuel Sieb Date: Sun, 3 Mar 2024 23:33:39 -0800 Subject: [PATCH] fix tmp102 negative calculation (#6320) --- esphome/components/tmp102/tmp102.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/esphome/components/tmp102/tmp102.cpp b/esphome/components/tmp102/tmp102.cpp index 7d92a28cf1..be60a2d8d4 100644 --- a/esphome/components/tmp102/tmp102.cpp +++ b/esphome/components/tmp102/tmp102.cpp @@ -39,9 +39,6 @@ void TMP102Component::update() { return; } raw_temperature = i2c::i2ctohs(raw_temperature); - if (raw_temperature & 0x8000) { - raw_temperature |= 0xF000; - } raw_temperature = raw_temperature >> 4; float temperature = raw_temperature * TMP102_CONVERSION_FACTOR; ESP_LOGD(TAG, "Got Temperature=%.1f°C", temperature);