feat: remove hardware reading logic from humidity reader

having it at both temp and humidity caused problems
This commit is contained in:
OMGeeky
2025-06-07 16:47:40 +02:00
parent 8785e20528
commit a0d7e27510

View File

@@ -135,19 +135,6 @@ class DHT22Sensor(TemperatureSensor, HumiditySensor):
The humidity reading as a float (percentage)
"""
if SIMULATION:
# Use parent class simulation
return super().read_humidity()
else:
# Actual hardware reading
try:
self._sensor.measure()
self._last_humidity = self._sensor.humidity()
except Exception as e:
print(f"Error reading DHT22 humidity: {e}")
# Return default value if no previous reading
self._last_humidity = 0.0
return self._last_humidity
def get_metadata(self):