* add config flow * fix tests * adjust and fix tests * fix tests * config_zones as fixture * add config flow tests * use coordinator.async_config_entry_first_refresh * use entry.entry_id for hass.data * fix doc string * remove unused unit_of_measurement string key * don't store friendly_name, just use self.name * abort on matching entiry * break out legacy setup into seperate function * make tracked entites required * move _asnyc_setup_legacy to module level * use zone name as config entry title * add entity_used_in helper * check entry source if imported * create repair issue for removed tracked entities * separate state change from registry change event handling * migrate unique ids after tracked entity renamed * use full words for the variable names * use defaultdict * add test * remove unnecessary if not in check * use unique_id of tracked entity * use the entity registry entry id * Apply suggestions from code review Co-authored-by: Martin Hjelmare <marhje52@gmail.com> --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
70 lines
2.5 KiB
JSON
70 lines
2.5 KiB
JSON
{
|
|
"title": "Proximity",
|
|
"config": {
|
|
"flow_title": "Proximity",
|
|
"step": {
|
|
"user": {
|
|
"data": {
|
|
"zone": "Zone to track distance to",
|
|
"ignored_zones": "Zones to ignore",
|
|
"tracked_entities": "Devices or Persons to track",
|
|
"tolerance": "Tolerance distance"
|
|
}
|
|
}
|
|
},
|
|
"abort": {
|
|
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
|
|
"success": "Changes saved"
|
|
}
|
|
},
|
|
"options": {
|
|
"step": {
|
|
"init": {
|
|
"data": {
|
|
"zone": "Zone to track distance to",
|
|
"ignored_zones": "Zones to ignore",
|
|
"tracked_entities": "Devices or Persons to track",
|
|
"tolerance": "Tolerance distance"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"entity": {
|
|
"sensor": {
|
|
"dir_of_travel": {
|
|
"name": "Direction of travel",
|
|
"state": {
|
|
"arrived": "Arrived",
|
|
"away_from": "Away from",
|
|
"stationary": "Stationary",
|
|
"towards": "Towards"
|
|
}
|
|
},
|
|
"nearest": { "name": "Nearest device" }
|
|
}
|
|
},
|
|
"issues": {
|
|
"deprecated_proximity_entity": {
|
|
"title": "The proximity entity is deprecated",
|
|
"fix_flow": {
|
|
"step": {
|
|
"confirm": {
|
|
"title": "[%key:component::proximity::issues::deprecated_proximity_entity::title%]",
|
|
"description": "The proximity entity `{entity}` is deprecated and will be removed in `2024.8`. However it is used within the following configurations:\n- {used_in}\n\nPlease adjust any automations or scripts that use this deprecated Proximity entity.\nFor each tracked person or device one sensor for the distance and the direction of travel to/from the monitored zone is created. Additionally for each Proximity configuration one sensor which shows the nearest device or person to the monitored zone is created. With this you can use the Min/Max integration to determine the nearest and furthest distance."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tracked_entity_removed": {
|
|
"title": "Tracked entity has been removed",
|
|
"fix_flow": {
|
|
"step": {
|
|
"confirm": {
|
|
"title": "[%key:component::proximity::issues::tracked_entity_removed::title%]",
|
|
"description": "The entity `{entity_id}` has been removed from HA, but is used in proximity {name}. Please remove `{entity_id}` from the list of tracked entities. Related proximity sensor entites were set to unavailable and can be removed."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|