Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/humidity/condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}

CONDITIONS: dict[str, type[Condition]] = {
"value": make_entity_numerical_condition(HUMIDITY_DOMAIN_SPECS, PERCENTAGE),
"is_value": make_entity_numerical_condition(HUMIDITY_DOMAIN_SPECS, PERCENTAGE),
}
Comment thread
frenck marked this conversation as resolved.


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/humidity/conditions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
device_class: humidity
translation_key: number_or_entity

value:
is_value:
Comment thread
frenck marked this conversation as resolved.
target:
entity:
- domain: sensor
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/humidity/icons.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"conditions": {
"value": {
"is_value": {
"condition": "mdi:water-percent"
}
},
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/humidity/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"trigger_behavior_name": "Behavior"
},
"conditions": {
"value": {
"is_value": {
"description": "Tests if a relative humidity value is above a threshold, below a threshold, or in a range of values.",
"fields": {
"above": {
Expand Down
18 changes: 9 additions & 9 deletions tests/components/humidity/test_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def target_humidifiers(hass: HomeAssistant) -> dict[str, list[str]]:
@pytest.mark.parametrize(
"condition",
[
"humidity.value",
"humidity.is_value",
],
)
async def test_humidity_conditions_gated_by_labs_flag(
Expand All @@ -75,7 +75,7 @@ async def test_humidity_conditions_gated_by_labs_flag(
@pytest.mark.parametrize(
("condition", "condition_options", "states"),
parametrize_numerical_condition_above_below_any(
"humidity.value",
"humidity.is_value",
device_class="humidity",
unit_attributes=_HUMIDITY_UNIT_ATTRS,
),
Expand Down Expand Up @@ -111,7 +111,7 @@ async def test_humidity_sensor_condition_behavior_any(
@pytest.mark.parametrize(
("condition", "condition_options", "states"),
parametrize_numerical_condition_above_below_all(
"humidity.value",
"humidity.is_value",
device_class="humidity",
unit_attributes=_HUMIDITY_UNIT_ATTRS,
),
Expand Down Expand Up @@ -147,7 +147,7 @@ async def test_humidity_sensor_condition_behavior_all(
@pytest.mark.parametrize(
("condition", "condition_options", "states"),
parametrize_numerical_condition_above_below_any(
"humidity.value",
"humidity.is_value",
device_class="humidity",
unit_attributes=_HUMIDITY_UNIT_ATTRS,
),
Expand Down Expand Up @@ -183,7 +183,7 @@ async def test_humidity_number_condition_behavior_any(
@pytest.mark.parametrize(
("condition", "condition_options", "states"),
parametrize_numerical_condition_above_below_all(
"humidity.value",
"humidity.is_value",
device_class="humidity",
unit_attributes=_HUMIDITY_UNIT_ATTRS,
),
Expand Down Expand Up @@ -219,7 +219,7 @@ async def test_humidity_number_condition_behavior_all(
@pytest.mark.parametrize(
("condition", "condition_options", "states"),
parametrize_numerical_attribute_condition_above_below_any(
"humidity.value",
"humidity.is_value",
HVACMode.AUTO,
CLIMATE_ATTR_CURRENT_HUMIDITY,
),
Expand Down Expand Up @@ -255,7 +255,7 @@ async def test_humidity_climate_condition_behavior_any(
@pytest.mark.parametrize(
("condition", "condition_options", "states"),
parametrize_numerical_attribute_condition_above_below_all(
"humidity.value",
"humidity.is_value",
HVACMode.AUTO,
CLIMATE_ATTR_CURRENT_HUMIDITY,
),
Expand Down Expand Up @@ -291,7 +291,7 @@ async def test_humidity_climate_condition_behavior_all(
@pytest.mark.parametrize(
("condition", "condition_options", "states"),
parametrize_numerical_attribute_condition_above_below_any(
"humidity.value",
"humidity.is_value",
STATE_ON,
HUMIDIFIER_ATTR_CURRENT_HUMIDITY,
),
Expand Down Expand Up @@ -327,7 +327,7 @@ async def test_humidity_humidifier_condition_behavior_any(
@pytest.mark.parametrize(
("condition", "condition_options", "states"),
parametrize_numerical_attribute_condition_above_below_all(
"humidity.value",
"humidity.is_value",
STATE_ON,
HUMIDIFIER_ATTR_CURRENT_HUMIDITY,
),
Expand Down
Loading