Core: meteo_france : non-unique city names requires dept / postal-code

Created on 24 May 2020  路  11Comments  路  Source: home-assistant/core

@oncleben31 cc @victorcerutti @Quentame

I think there are 2 options to solve this in config flow:

  • add a 'dept' key
  • move the mention of postal codes from comment to 'default value'

Log Details (WARNING)
Logger: homeassistant.components.meteo_france.sensor
Source: components/meteo_france/sensor.py:61
Integration: M茅t茅o-France (documentation, issues)
First occurred: 9:04:14 AM (1 occurrences)
Last logged: 9:04:14 AM

No 'dept' key found for 'xxxxxx'. So weather alert information won't be available

_Originally posted by @thefrenchmatt in https://github.com/home-assistant/core/issues/31925#issuecomment-633195317_

meteo_france need-more-information

Most helpful comment

The new Python module do use the new API is ready. As soon as it will be implemented in HA, you will be able to search for location around your position. Or use GPS coordinates. It will be a easier.

All 11 comments

dept key is get by the API. Theoretically no need for setting in the config flow. Do you have an example of city or city id to reproduce the error ?

@thefrenchmatt Thanks for opening up an issue.

First of all, please don't tag maintainers yourself, it can be considered annoying in general.

Secondly, when creating an issue, an issue template is presented. Please update your issue to have that template. Without it, the issue will be closed.

Thanks already! 馃憤

Hey there @victorcerutti, @Quentame, mind taking a look at this issue as its been labeled with a integration (meteo_france) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@thefrenchmatt without additional information we won't be able to investigate. Help us to help you.

I have the same problem on my city with homonym...

In the doc it's mentionned to add the postal code after the city name but not working ...

Example with "Montreal" (many cities in France with postal code 89420, 32250, 07110 ...)

The search of "montreal, 32250" return always the first result : city montreal with postal code 89420
https://www.meteofrance.com/mf3-rpc-portlet/rest/lieu/facet/previsions/search/montreal,32250

I took note of the issue.

I think I'll make a select in the UI containing a list with the city name, postal code and country (only if multiple city found). So you can choose wizely.

Will do with the API changes that are gonna be made soon.

@romain3w @thefrenchmatt
Can you try entering the postal code instead of the city name ?
See if it fixes.

@Quentame thanks a lot ! how could help you ?
FYI with postal code not always working because, some cities have also same postal code (e.g 89420)

For now you can't, will tell you when you can :wink:

The new Python module do use the new API is ready. As soon as it will be implemented in HA, you will be able to search for location around your position. Or use GPS coordinates. It will be a easier.

The integration was redesigned from scratch in #37737 and merged into 0.114.0, you can test it in current beta :wink:

There is already people testing it in the French community, if you want to join --> https://discord.com/invite/PaZFEjX

Was this page helpful?
0 / 5 - 0 ratings

Related issues

winterscar picture winterscar  路  251Comments

ariel-madril picture ariel-madril  路  451Comments

kdschlosser picture kdschlosser  路  374Comments

nodkan picture nodkan  路  161Comments

rschaeuble picture rschaeuble  路  230Comments