Skip to content

Add humidity condition#166358

Merged
frenck merged 2 commits into
home-assistant:devfrom
justanotherariel:humidity-condition
Mar 24, 2026
Merged

Add humidity condition#166358
frenck merged 2 commits into
home-assistant:devfrom
justanotherariel:humidity-condition

Conversation

@justanotherariel
Copy link
Copy Markdown
Member

Breaking change

Proposed change

SSIA

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

@justanotherariel justanotherariel added this to the 2026.4.0b0 milestone Mar 24, 2026
@justanotherariel justanotherariel requested a review from a team as a code owner March 24, 2026 15:37
Copilot AI review requested due to automatic review settings March 24, 2026 15:37
@home-assistant home-assistant Bot added cla-signed core has-tests integration: automation integration: humidity new-feature Top 100 Integration is ranked within the top 100 by usage Top 200 Integration is ranked within the top 200 by usage Top 50 Integration is ranked within the top 50 by usage Quality Scale: internal labels Mar 24, 2026
@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (automation) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of automation can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign automation Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

@home-assistant
Copy link
Copy Markdown
Contributor

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (humidity) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of humidity can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign humidity Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new experimental (Home Assistant Labs) condition provider to the humidity system integration so automations can evaluate relative humidity thresholds across supported entity domains.

Changes:

  • Introduces humidity.value condition backed by make_entity_numerical_condition with support for sensor, number, and humidity attributes on climate/humidifier.
  • Adds UI schema/strings/icons for the new condition, including any/all behavior selection.
  • Adds a new test module covering the condition behavior for sensors, climates, and humidifiers (behind the labs feature flag).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
homeassistant/components/humidity/condition.py Implements humidity.value condition across multiple domains via domain specs and unit validation.
homeassistant/components/humidity/conditions.yaml Defines the condition schema (targets, behavior selector, above/below number-or-entity fields).
homeassistant/components/humidity/strings.json Adds translations for the new condition and selector options.
homeassistant/components/humidity/icons.json Adds an icon mapping for the new condition.
homeassistant/components/humidity/__init__.py Updates integration description to include conditions.
homeassistant/components/automation/__init__.py Registers humidity as an experimental condition platform (labs-gated).
tests/components/humidity/test_condition.py Adds tests for condition gating and behavior for supported domains.

Comment thread homeassistant/components/humidity/condition.py
Copy link
Copy Markdown
Contributor

@emontnemery emontnemery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @justanotherariel 👍

@frenck frenck merged commit 65ae221 into home-assistant:dev Mar 24, 2026
46 checks passed
@frenck frenck removed this from the 2026.4.0b0 milestone Mar 25, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed core has-tests integration: automation integration: humidity new-feature Quality Scale: internal Top 50 Integration is ranked within the top 50 by usage Top 100 Integration is ranked within the top 100 by usage Top 200 Integration is ranked within the top 200 by usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add humidity.value condition humidity conditions

4 participants