Skip to content

Releases: Corsw/homeassistant-generic-hygrostat

Generic Hygrostat v0.9.0

Choose a tag to compare

@Corsw Corsw released this 20 Aug 13:52
3e2ca51

Generic Hygrostat v0.9.0

Generic Hygrostat v0.9.0 is a modernization and reliability release for current Home Assistant versions.

The existing YAML configuration and humidity-rise detection behavior are deliberately preserved, so existing installations can upgrade without migrating their configuration.

Highlights

Home Assistant modernization

  • Modernized the entity implementation to use BinarySensorEntity
  • Updated entity state, availability and attribute handling for current Home Assistant APIs
  • Switched to Home Assistant datetime utilities
  • Updated integration metadata for Home Assistant and HACS
  • Added a local brand icon
  • Added automated HACS and Hassfest validation

Improved sensor availability handling

The humidity source sensor is not always ready when Home Assistant starts.

Previous versions could log warnings such as:

  • humidity sensor not found
  • humidity sensor state is unknown

v0.9.0 treats missing, unknown and unavailable source states as temporary conditions.

While the source sensor is unavailable, the Generic Hygrostat binary sensor is reported as unavailable instead of producing unnecessary startup warnings.

Actual invalid source values are still reported appropriately.

Safer humidity value handling

Humidity readings are now validated before they are used.

Invalid values such as:

  • non-numeric values
  • nan
  • inf
  • -inf

are rejected and the entity becomes temporarily unavailable.

Improved timer safety

max_on_time is now checked before reading the humidity source sensor.

This means the maximum on-time safety limit can still switch the hygrostat off even when the humidity sensor has become unavailable.

v0.9.0 also prevents the hygrostat from immediately switching back on during the same update cycle in which max_on_time switched it off.

The existing min_on_time behavior is preserved.

Configuration validation

sample_interval must now be greater than zero.

Invalid zero or negative sampling intervals are rejected during configuration validation instead of causing unexpected runtime behavior.

Diagnostics

The entity exposes readable diagnostic attributes to make its behavior easier to understand and troubleshoot, including:

  • Number of samples
  • Lowest sample
  • Target
  • Minimum on timer
  • Maximum on timer
  • Minimum humidity

Inactive targets and timers are displayed using readable values such as:

  • Inactive
  • Inactive (hygrostat is off)

Active timers show their expiration time.

State-dependent icons

The binary sensor now uses different icons depending on its state:

  • Off: mdi:water-outline
  • On: mdi:water-plus
  • Unavailable: mdi:water-off

Detection behavior

The humidity-rise detection algorithm itself has deliberately not been redesigned in v0.9.0.

Generic Hygrostat continues to:

  1. Sample the configured humidity sensor at a fixed interval
  2. Maintain a recent sample history
  3. Compare the current humidity against the lowest recent sample
  4. Switch on when the configured humidity rise (delta_trigger) is reached
  5. Calculate a target humidity using the recent baseline and configured target offset
  6. Respect the configured minimum and maximum on-times

This release focuses on compatibility, reliability and maintainability rather than changing how existing installations detect a shower or humidity event.

Compatibility

Existing YAML configurations remain supported and no YAML migration is required for v0.9.0.

Existing settings such as:

  • sensor
  • attribute
  • delta_trigger
  • target_offset
  • min_humidity
  • min_on_time
  • max_on_time
  • sample_interval
  • unique_id

continue to work as before.

v0.9.0 does not introduce GUI configuration or a config flow. YAML configuration remains the supported configuration method for this release.

Generic Hygrostat vs Home Assistant Core

This custom integration serves a different purpose from Home Assistant Core's Generic Hygrostat.

This integration:

  • Detects a rapid rise in relative humidity
  • Uses a recent humidity baseline
  • Exposes the result as a binary sensor
  • Is particularly useful for automations such as bathroom ventilation

Home Assistant Core Generic Hygrostat:

  • Maintains a configured target humidity
  • Controls a humidifier or dehumidifier
  • Directly works with a switch or similar controlled device

Domain compatibility note

The integration deliberately keeps the historical generic_hygrostat domain in v0.9.0 to avoid breaking existing installations.

Home Assistant Core also has an integration using the generic_hygrostat domain. Hassfest therefore reports a domain-collision warning.

This is known and expected for v0.9.0.

Changing the integration domain would require a carefully designed migration path and is outside the scope of this compatibility-focused release.

Upgrade notes

After upgrading, the binary sensor may temporarily become unavailable when its source humidity sensor is unavailable or contains an invalid value.

This is intentional and more accurately represents the actual state of the entity.

Existing YAML configuration does not need to be changed.

Validation and testing

v0.9.0 has been tested on Home Assistant using an existing Generic Hygrostat installation.

Testing included:

  • Home Assistant restart and integration startup
  • Startup while the humidity source sensor is not yet ready
  • Normal sampling and humidity-rise detection
  • Entity availability
  • Diagnostic attributes
  • Dynamic icons
  • Existing YAML configuration
  • Triggering and timer behavior during normal bathroom ventilation use

Hassfest validation completes with the expected domain-collision warning described above.

HACS currently passes 8 of 9 repository validation checks.

The remaining HACS validation issue is that the repository does not yet contain an explicit license. Licensing of the historical code is being clarified with the original author and will be addressed in a follow-up release.

This repository-level licensing check does not affect the functional changes included in v0.9.0.

Documentation

The README and HACS documentation have been extensively rewritten and expanded, including:

  • Installation instructions
  • Configuration reference
  • Detection algorithm explanation
  • Timer behavior
  • Diagnostic attributes
  • Automation examples
  • Comparison with Home Assistant Core's Generic Hygrostat
  • Upgrade information

Project maintenance

Thanks to @basschipper for creating and maintaining Generic Hygrostat and for transferring the project.

Starting with v0.9.0, the project is maintained by @Corsw.

Ideas, suggestions, bug reports and contributions are very welcome. If you have a feature request, improvement idea or run into an issue, feel free to open an issue or start a discussion on GitHub.

v0.8.0

Choose a tag to compare

@basschipper basschipper released this 08 Jun 05:18

Python 3.11 compatibility

v0.7.1

Choose a tag to compare

@basschipper basschipper released this 09 Jan 14:17
Updated version tag

v0.7.0

Choose a tag to compare

@basschipper basschipper released this 08 Jan 12:52
Updated readme

v0.6.0

Choose a tag to compare

@basschipper basschipper released this 06 Jan 20:11
Added unique_id

v0.5.0

Choose a tag to compare

@basschipper basschipper released this 20 May 19:31
Added min_on_time documentation

v0.4.0

Choose a tag to compare

@basschipper basschipper released this 11 Mar 09:20
46e35b4
Merge pull request #20 from Nixon506E/patch-1

Include version in manifest.json

v0.3.0

Choose a tag to compare

@basschipper basschipper released this 29 Dec 12:57

Added minimum humidity

v0.2.0

Choose a tag to compare

@basschipper basschipper released this 21 Sep 16:05
a5a22fa

v0.1.0

Choose a tag to compare

@basschipper basschipper released this 06 Jul 20:51
Fixed codeowner