Skip to content

Commit

Permalink
Adjust (re)configure flow for HA 2024.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodpayne committed Apr 20, 2024
1 parent 43e36da commit 0aba642
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions custom_components/person_location/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ async def _async_save__integration_config_data(self):
# return self.async_create_entry(title="", data={})
# return self.async_create_entry(title="", data=None)
return self.async_abort(reason="normal exit")
else:
self._errors["base"] = "nothing_was_changed"
return await self.async_step_user()
else:
return self.async_create_entry(title=location_name, data=self._user_input)
self._errors["base"] = "nothing_was_changed"
return await self.async_step_user()
return self.async_create_entry(
title=location_name,
data=self._user_input)

async def _async_show_config_geocode_form(
self, user_input
Expand Down Expand Up @@ -390,6 +390,11 @@ async def _test_osm_api_key(self, osm_api_key):

# ------------------------------------------------------------------

async def async_step_reconfigure(self, user_input=None):
return await self.async_step_user(user_input)

# ------------------------------------------------------------------

@staticmethod
@callback
def async_get_options_flow(config_entry):
Expand Down
6 changes: 3 additions & 3 deletions custom_components/person_location/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"config": {
"step": {
"user": {
"title": "(1 of 3) Person Location Geocode Configuration",
"title": "(1 of 3) Person Location Geocode",
"description": "Reverse geocoding can be done using one (or more) of three services. If you need help with the configuration or obtaining keys, have a look at More Details [**here**](https://github.com/rodpayne/home-assistant_person_location/blob/master/README.md#configuration-parameters).",
"data": {
"language": "Google Language",
Expand All @@ -13,15 +13,15 @@
}
},
"sensors": {
"title": "(2 of 3) Person Location Sensors Configuration",
"title": "(2 of 3) Person Location Sensors",
"description": "Individual sensors can be created so that template sensors do not need to be configured. Choose from this list: altitude, bread_crumbs, direction, driving_miles, driving_minutes, geocoded, latitude, longitude, meters_from_home, miles_from_home. If you need help with the configuration, have a look [**here**](https://github.com/rodpayne/home-assistant_person_location/blob/master/README.md#configuration-parameters).",
"data": {
"create_sensors": "Sensors to be created",
"platform": "Platform for output sensor (experimental)"
}
},
"triggers": {
"title": "(3 of 3) Person Location Triggers Configuration",
"title": "(3 of 3) Person Location Triggers",
"description": "You can follow updates of all Person entities rather than configuring individual Triggers. The individual Triggers may be specified by clicking CONFIGURE for the integration. If you need help with the configuration, have a look [**here**](https://github.com/rodpayne/home-assistant_person_location/blob/master/README.md#configuration-parameters).",
"data": {
"follow_person_integration": "Follow Person Integration"
Expand Down

0 comments on commit 0aba642

Please sign in to comment.