ims-custom-component icon indicating copy to clipboard operation
ims-custom-component copied to clipboard

[FR] City list instead of filling it manuall from hard coded list

Open elad-bar opened this issue 1 year ago • 2 comments

thanks for releasing that component, following endpoint will reterive list of supported cities, users will not need to get familiar with their city code: GET https://ims.gov.il/en/locations_info

even nicer feature can be to identify it based on the HA location as each location in the response holds the coordinates of it, below is subset of cities from the list (left only 3 for the huge response):

{
    "data": {
        "1": {
            "lid": "1",
            "name": "Jerusalem",
            "lat": "31.7780",
            "lon": "35.2000",
            "zoom": "1",
            "height": "780",
            "is_park": "0"
        },
        "2": {
            "lid": "2",
            "name": "Tel Aviv - Yafo",
            "lat": "32.0821",
            "lon": "34.7802",
            "zoom": "1",
            "height": "30",
            "is_park": "0"
        },
        "3": {
            "lid": "3",
            "name": "Haifa",
            "lat": "32.7900",
            "lon": "34.9900",
            "zoom": "1",
            "height": "250",
            "is_park": "0"
        }
    },
    "method": "GET"
}

please consider adding it thanks

elad-bar avatar Mar 14 '23 07:03 elad-bar

I'm not sure I understand what you're suggesting; Automatic detecation of location (instead of specifying it manually during configuration)

GuyKh avatar Mar 14 '23 09:03 GuyKh

Option 1 - present list of cities dynamically from the list available in ims for the configuration Option 2 - auto identify Option 3 - combination of the options above, list from the endpoint, auto selection based on HA coordinates

elad-bar avatar Mar 14 '23 09:03 elad-bar