Offset Filter Not Working

I am trying to offset the temperature reading on a DHT11 sensor. However, regardless of what amount I put the offset, it does not change the reading in the logs or HA. I put it at -10.5 just as an extreme, but it doesnt matter what I set it to.

sensor:
  - platform: dht
    model: "DHT11"
    pin: GPIO12
    temperature:
      name: ${friendly_name} Temperature
      id: temperature
      filters:
        - offset: -10.5
    humidity:
      name: ${friendly_name} Humidity
      id: humidity
    update_interval: 5s


Also, is it possible to change the degrees from Celcius to Fahrenheit in the logs?

The documentation for offset says: “Adds a constant value to each sensor value.” You would assume that “adds” would accept a negative number, but maybe not? You could try a lambda to see if that works:

    filters:
      - lambda: return (x - 10.5) * (9.0/5.0) + 32.0;
    unit_of_measurement: "°F"

The example shows a negative number, but I tried positive numbers as well and no dice.

@snel6424
I’m using the following and it works well.

sensor:
  - platform: dht
    pin: GPIO2
    temperature:
      name: "Temperature"
      filters:
        - offset: -11
        - sliding_window_moving_average:
            window_size: 30
            send_every: 5
    humidity:
      name: "Humidity"
      filters:
        - offset: 0
    update_interval: 60s

I actually figured it out. For whatever reason, the OTA update wasn’t working. I flashed it manually and it has been working correctly ever since!