mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Deduplicate strings and fix sentence-casing in proximity
(#147777)
* Deduplicate strings and fix sentence-casing in `proximity` * Update test_init.py
This commit is contained in:
parent
369c8d1e0d
commit
4add346272
@ -1,13 +1,13 @@
|
||||
{
|
||||
"title": "Proximity",
|
||||
"config": {
|
||||
"flow_title": "Proximity",
|
||||
"flow_title": "[%key:component::proximity::title%]",
|
||||
"step": {
|
||||
"user": {
|
||||
"data": {
|
||||
"zone": "Zone to track distance to",
|
||||
"ignored_zones": "Zones to ignore",
|
||||
"tracked_entities": "Devices or Persons to track",
|
||||
"tracked_entities": "Devices or persons to track",
|
||||
"tolerance": "Tolerance distance"
|
||||
}
|
||||
}
|
||||
@ -21,10 +21,10 @@
|
||||
"step": {
|
||||
"init": {
|
||||
"data": {
|
||||
"zone": "Zone to track distance to",
|
||||
"ignored_zones": "Zones to ignore",
|
||||
"tracked_entities": "Devices or Persons to track",
|
||||
"tolerance": "Tolerance distance"
|
||||
"zone": "[%key:component::proximity::config::step::user::data::zone%]",
|
||||
"ignored_zones": "[%key:component::proximity::config::step::user::data::ignored_zones%]",
|
||||
"tracked_entities": "[%key:component::proximity::config::step::user::data::tracked_entities%]",
|
||||
"tolerance": "[%key:component::proximity::config::step::user::data::tolerance%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -32,7 +32,7 @@
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"dir_of_travel": {
|
||||
"name": "{tracked_entity} Direction of travel",
|
||||
"name": "{tracked_entity} direction of travel",
|
||||
"state": {
|
||||
"arrived": "Arrived",
|
||||
"away_from": "Away from",
|
||||
@ -40,15 +40,15 @@
|
||||
"towards": "Towards"
|
||||
}
|
||||
},
|
||||
"dist_to_zone": { "name": "{tracked_entity} Distance" },
|
||||
"dist_to_zone": { "name": "{tracked_entity} distance" },
|
||||
"nearest": { "name": "Nearest device" },
|
||||
"nearest_dir_of_travel": {
|
||||
"name": "Nearest direction of travel",
|
||||
"state": {
|
||||
"arrived": "Arrived",
|
||||
"away_from": "Away from",
|
||||
"stationary": "Stationary",
|
||||
"towards": "Towards"
|
||||
"arrived": "[%key:component::proximity::entity::sensor::dir_of_travel::state::arrived%]",
|
||||
"away_from": "[%key:component::proximity::entity::sensor::dir_of_travel::state::away_from%]",
|
||||
"stationary": "[%key:component::proximity::entity::sensor::dir_of_travel::state::stationary%]",
|
||||
"towards": "[%key:component::proximity::entity::sensor::dir_of_travel::state::towards%]"
|
||||
}
|
||||
},
|
||||
"nearest_dist_to_zone": { "name": "Nearest distance" }
|
||||
|
@ -871,7 +871,7 @@ async def test_sensor_unique_ids(
|
||||
assert entity
|
||||
assert entity.unique_id == f"{mock_config.entry_id}_{t1.id}_dist_to_zone"
|
||||
state = hass.states.get(sensor_t1)
|
||||
assert state.attributes.get(ATTR_FRIENDLY_NAME) == "Home Test tracker 1 Distance"
|
||||
assert state.attributes.get(ATTR_FRIENDLY_NAME) == "Home Test tracker 1 distance"
|
||||
|
||||
entity = entity_registry.async_get("sensor.home_test2_distance")
|
||||
assert entity
|
||||
|
Loading…
x
Reference in New Issue
Block a user