Generic Hygrometer component with Humidifier (works great) + Dehumidifier (does not work)

I have my humidifier working under the Generic Hygrometer component - it works like a charm.
Now I’m trying to make my dehumidifier work as well, through the same component, but I’m not achieving that goal.
My config code:

# GENERIC HYGROSTAT - HUMIDIFIER
generic_hygrostat:
  - name: Humidifier_1
    humidifier: switch.tasmota_2
    target_sensor: sensor.humid_inside_garden
    min_humidity: 40
    max_humidity: 65
    target_humidity: 50
    dry_tolerance: 5
    wet_tolerance: 5
    device_class: "humidifier"
    min_cycle_duration:
      seconds: 30
    keep_alive:
      minutes: 3
    initial_state: true
    away_humidity: 35
    away_fixed: True
    sensor_stale_duration: 00:15:00
# GENERIC HYGROSTAT - DEHUMIDIFIER
  - name: Dehumidifier_1
    humidifier: switch.tasmota_4
    target_sensor: sensor.humid_inside_garden
    min_humidity: 30
    max_humidity: 60
    target_humidity: 40
    dry_tolerance: 5
    wet_tolerance: 5
    device_class: "dehumidifier"
    min_cycle_duration:
      seconds: 30
    keep_alive:
      minutes: 3
    initial_state: true
    away_humidity: 35
    away_fixed: True
    sensor_stale_duration: 00:15:00

My dashboard is like so in the case of the humidifier:
Untitled10

In the case of the dehumidifier is like this:
Untitled11

In this last case, as it can be seen, the dehumidifier (Tasmota_4) does not switch on, even when the target humidity is 30% and the humidity sensor reads 45%. (tolerance ± 5)

What could be wrong?

Thank you in advance for giving me an hand.

Hi, did you find a solution for this? I’m running into the same problem

Hello, nope, unfortunately not yet…

Any luck? I have the same problem. My dehumidifier acts like a humidifier. If the humidity is lower than the set value, it turns on the dehumidifier when it should turn it on only when the humidity is HIGHER than the set value. It is as if this line is being ignored:

device_class: "dehumidifier"

here is my YAML

generic_hygrostat:
  - name: Pool Room Humidity Control
    humidifier: switch.dehumidifier
    target_sensor: sensor.pool_room_humidity
    device_class: "dehumidifier"
    min_humidity: 0
    max_humidity: 100
    target_humidity: 50
    dry_tolerance: 3
    wet_tolerance: 0
    min_cycle_duration:
      seconds: 5
    dry_tolerance: 5
    wet_tolerance: 5

Not yet. The last thought I had about this was to simply use the core automations for my dehumidifier. I still need to put my mind on it tough.

Has this issue been resolved? I have the same problem.

Also the same problem. Has also reply to the Generic hygrostat but that is 2 years old.