Generic Hygrostat implementation

Greetings fellow users.

I was excited to see the new generic hygrostat in the latest version, and was looking forward to using it in my setup. I have it configured in my configuration.yaml as specified, but it doesn’t seem to automatically activate. I notice that I get a new “hygrostat” showing in my default dashboard, but it will only activate if I manually select a humidity value that is less than the currently detected value. Since it is so new, I can only find documentation on the configuration.

here is my relevant code:

generic_hygrostat:
  - name: Bathroom Humidity
    humidifier: switch.mb_exhaust_fan
    target_sensor: sensor.4_in_1_sensor_humidity
    device_class: "dehumidifier"
    wet_tolerance: 5
    min_humidity: 50
    max_humidity: 60
    target_humidity: 55

I had previously set up 2 separate automations that would control the fan at set values. I had hoped that the new native Humidifier would allow a smart response to seasonally adjusted humidity values, but it seems that it locks it to a user selected value that can be randomly changed outside the configured parameters.

here is a snip of the new interface in the overview, as you can see, the value of 57 is not relevant to the config.yaml options.

What am I missing to have the control of the switch that is specified?

Thanks in advance,
James

The idea is that you set the value of humidity you want, e.g. 55% and if the actual measured humidity falls below that minus the default dry tolerance of 3, (as you have not set one) the switch turns on. So if set to 55% your switch should turn on at 52% (target - dry tolerance) and off at 60% (target + wet tolerance).

You can then adjust the set value according to season with automations if you wish to.

How so?

57% is between your configured min and max humidities.

Tom,

Thank you for the clarification. I clearly got lost in the overall picture, and did not realize how both wet and dry would set the limits on either side. I was focusing on the “wet” side only. I was treating this as a binary switch in operation.

Also, as a new user, I forgot to reload my config.yaml. I was getting unexpected results and usage because of my error.

After additional reflection, I can see the benefit of using the hygrostat, as it effectively removes the duplicity of setting up separate automations to both turn on and turn off the fan. Even better, like you kindly pointed out, it allows 2 separate humidity values to control the turning on, and turning off at the top and bottom of a specified range.

Thank you for the insight.
James

Thanks to this and the new Tuya integration I have attempted to make a hygrostat that uses a govee thermo-hygrometer to determine the humidity level and control a dehumidifier accordingly. It works pretty well but just have a few questions:

Is there a way to determine what Away mode does? I imagine I’ll need to use an automation (especially as the modes don’t even seem to be accessible from HA) but I wanted it to change the dehumidifier to high/low mode.

Most importantly though, when I import this over to Apple Home it sets the “Current Relative Humidity” to 0% (but does still turn on/off based on the target sensor I set in HA). This wouldn’t really be an issue but it means the room’s current humidity shows as 0%. Any idea how to fix that?

generic_hygrostat:
  - name: Hygrostat
    humidifier: humidifier.electriq
    target_sensor: sensor.living_room_humidity
    min_humidity: 0
    max_humidity: 100
    target_humidity: 50
    device_class: dehumidifier
    dry_tolerance: 1
    wet_tolerance: 1
    away_humidity: 60

Hello!
I really like this integration, and sucessfully created the entity, and it’s working fine. But I have solar pannels, and I would like to only use the device if I have spare energy to use it, or if I manually order it to. So, is it possible, somehow, to set an entity like this to turn on only when some other conditions are true?
Thanks in advance!