Skip to content

Commit

Permalink
fix: fix user input malformed error and translations
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Apr 21, 2022
1 parent a47fef1 commit 184a68b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions custom_components/nws_alerts/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ async def _get_zone_list(self) -> list | None:
zone_list.append(data[JSON_FEATURES][x][JSON_PROPERTIES][JSON_ID])
x += 1
_LOGGER.debug("Zones list: %s", zone_list)
zone_list = ",".join(str(x) for x in zone_list) # convert list to str
return zone_list
return None

Expand Down
18 changes: 15 additions & 3 deletions custom_components/nws_alerts/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@
"interval": "Update Interval (in minutes)",
"timeout": "Update Timeout (in seconds)"
},
"description": "You can find your Zone or County ID by going to https://alerts.weather.gov/,\nscroll down to your state and click on the 'zone list' and/or 'county list' then look for the entry for your county.\n\nSeperate multiple zones with commas ie: PAC049,WVC031\n\nZones closest to you will be populated automatically.",
"title": "NWS Alerts"
"description": "You can find your Zone or County ID by going to https://alerts.weather.gov/,\nscroll down to your state and click on the 'zone list' and/or 'county list' then look for the entry for your county.\nSeperate multiple zones with commas ie: PAC049,WVC031\n\nZones closest to you will be populated automatically."
}
}
},
"options": {
"step": {
"init": {
"data": {
"name": "Friendly Name",
"zone_id": "Zone ID(s)",
"interval": "Update Interval (in minutes)",
"timeout": "Update Timeout (in seconds)"
},
"description": "You can find your Zone or County ID by going to https://alerts.weather.gov/,\nscroll down to your state and click on the 'zone list' and/or 'county list' then look for the entry for your county.\nSeperate multiple zones with commas ie: PAC049,WVC031"
}
}
}
}
}

0 comments on commit 184a68b

Please sign in to comment.