mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Fix meteoalarm exception handling with instance of KeyError (#34828)
This commit is contained in:
parent
5825cd7868
commit
b9bd757df1
@ -42,7 +42,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
api = Meteoalert(country, province, language)
|
api = Meteoalert(country, province, language)
|
||||||
except KeyError():
|
except KeyError:
|
||||||
_LOGGER.error("Wrong country digits or province name")
|
_LOGGER.error("Wrong country digits or province name")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user