Skip to content

Commit

Permalink
Add missing unit of measurement for tolerance option in proximity (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
mib1185 authored Feb 29, 2024
1 parent b0ed8c4 commit 2a135b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions homeassistant/components/proximity/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
ConfigFlowResult,
OptionsFlow,
)
from homeassistant.const import CONF_ZONE
from homeassistant.const import CONF_ZONE, UnitOfLength
from homeassistant.core import State, callback
from homeassistant.helpers.selector import (
EntitySelector,
Expand Down Expand Up @@ -54,7 +54,9 @@ def _base_schema(user_input: dict[str, Any]) -> vol.Schema:
CONF_TOLERANCE,
default=user_input.get(CONF_TOLERANCE, DEFAULT_TOLERANCE),
): NumberSelector(
NumberSelectorConfig(min=1, max=100, step=1),
NumberSelectorConfig(
min=1, max=100, step=1, unit_of_measurement=UnitOfLength.METERS
),
),
}

Expand Down

0 comments on commit 2a135b6

Please sign in to comment.