mirror of
https://github.com/elisspace/core.git
synced 2026-09-01 17:04:05 +00:00
Fix meteoalarm exception handling with instance of KeyError (#34828)
This commit is contained in:
@@ -42,7 +42,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
|
||||
try:
|
||||
api = Meteoalert(country, province, language)
|
||||
except KeyError():
|
||||
except KeyError:
|
||||
_LOGGER.error("Wrong country digits or province name")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user