Derivative from humidity value form MQTT issue

Hello!

I used derivative from the humidity sensor for detecting if my bathroom was occupated and now needs to turn the heater on for some period of time. It works fine as I used Xiaomi Zigbee sensor over Deconz with Raspbee 2 shield. Then I just moved to zigbee2mqtt with this shield and found that the derivative calculation went totally wrong.
Has someone any idea how to fix it and what is wrong?

configuration.yaml:
sensor:
  - platform: derivative
    source: sensor.th_bathroom_humidity
    name: Humidity_Bathroom_change_over_5_min
    round: 1
    unit_time: min
    time_window: "00:05:00" 

results:

Looks like something wrong with the calculation of percent values.

Thanks for any help!

Same problem here. Wondering if you were able to sort this out somehow?