amitfin / oref_alert

Israeli Oref Alerts
MIT License
70 stars 5 forks source link

Alert has an unrecognized area: 'ביר הדאג #50

Closed svadel closed 6 months ago

svadel commented 6 months ago

System Health details

System Information

version core-2024.4.3
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.1.24-v8+
arch aarch64
timezone Asia/Jerusalem
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4988 Installed Version | 1.34.0 Stage | running Available Repositories | 1401 Downloaded Repositories | 29
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 6 -- | -- resources | 17 views | 9 mode | yaml
Recorder oldest_recorder_run | April 4, 2024 at 10:54 -- | -- current_recorder_run | April 14, 2024 at 16:16 estimated_db_size | 99.50 MiB database_engine | mysql database_version | 11.3.2

Checklist

Describe the issue

Hi! The Oref integration started generating the log below:

This error originated from a custom integration.

Logger: custom_components.oref_alert Source: custom_components/oref_alert/coordinator.py:94 integration: Oref Alert (documentation, issues) First occurred: 17:25:04 (82 occurrences) Last logged: 17:27:46

Alert has an unrecognized area: 'ביר הדאג

Reproduction steps

  1. Send hundreds of iranian missiles to Israel
  2. ...

Debug logs

2024-04-14 17:43:13.631 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration oref_alert which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2024-04-14 17:43:19.510 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'zha', 'schedule', 'cast', 'xiaomi_miot', 'homeassistant_alerts', 'telegram_bot', 'lovelace', 'jewish_calendar', 'input_boolean', 'sensor', 'config', 'person', 'workday', 'rpi_power', 'diagnostics', 'image_upload', 'application_credentials', 'input_select', 'system_health', 'sun', 'blueprint', 'webrtc', 'ims', 'light', 'miwifi', 'counter', 'version', 'file_upload', 'analytics', 'yi_hack', 'script', 'mobile_app', 'xiaomi_miio', 'yeelight', 'qnap', 'energy', 'template', 'backup', 'geo_location', 'hardware', 'binary_sensor', 'stream', 'group', 'openexchangerates', 'upnp', 'shell_command', 'conversation', 'my', 'switch', 'google', 'samsungtv_smart', 'xiaomi_aqara', 'auth', 'zone', 'tag', 'notify', 'dlna_dms', 'sql', 'input_button', 'uptime', 'fan', 'scene', 'device_automation', 'wake_on_lan', 'persistent_notification', 'rest_command', 'automation', 'input_text', 'watchman', 'esphome', 'onboarding', 'tts', 'adaptive_lighting', 'shopping_list', 'media_source', 'stt', 'systemmonitor', 'ffmpeg', 'hacs', 'assist_pipeline', 'input_number', 'morph_numbers', 'timer', 'xiaomi_gateway3', 'history', 'moon', 'radio_browser', 'search', 'logbook', 'ssh_command', 'openweathermap', 'map', 'mqtt', 'wake_word', 'input_datetime', 'oref_alert', 'trace', 'presence_simulation', 'default_config', 'device_tracker'}

2024-04-14 17:43:30.111 INFO (MainThread) [homeassistant.setup] Setting up oref_alert
2024-04-14 17:43:30.111 INFO (MainThread) [homeassistant.setup] Setup of domain oref_alert took 0.00 seconds

2024-04-14 17:43:30.289 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:43:30.290 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.178 seconds (success: True)

2024-04-14 17:43:41.927 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up oref_alert.binary_sensor
2024-04-14 17:43:41.934 INFO (MainThread) [homeassistant.components.sensor] Setting up oref_alert.sensor
2024-04-14 17:43:41.937 INFO (MainThread) [homeassistant.components.geo_location] Setting up oref_alert.geo_location

2024-04-14 17:43:43.673 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:43:43.674 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.114 seconds (success: True)

2024-04-14 17:43:45.652 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:43:45.652 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.092 seconds (success: True)

2024-04-14 17:43:47.627 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:43:47.628 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.066 seconds (success: True)

2024-04-14 17:43:50.307 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:43:50.307 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.625 seconds (success: True)

2024-04-14 17:44:54.645 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:44:54.645 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.068 seconds (success: True)
2024-04-14 17:44:56.595 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:44:56.596 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.036 seconds (success: True)
2024-04-14 17:44:58.593 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:44:58.593 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.033 seconds (success: True)
2024-04-14 17:45:00.581 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:00.582 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.022 seconds (success: True)

2024-04-14 17:45:02.585 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:02.586 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.026 seconds (success: True)

2024-04-14 17:45:04.583 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:04.584 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.025 seconds (success: True)

2024-04-14 17:45:10.580 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:10.581 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.254 seconds (success: True)

2024-04-14 17:45:12.658 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:12.658 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.098 seconds (success: True)

2024-04-14 17:45:14.634 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:14.634 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.045 seconds (success: True)

2024-04-14 17:45:16.586 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:16.586 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.024 seconds (success: True)
2024-04-14 17:45:18.581 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:18.582 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.022 seconds (success: True)

2024-04-14 17:45:20.582 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:20.582 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.022 seconds (success: True)

2024-04-14 17:45:22.581 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:22.581 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.022 seconds (success: True)
2024-04-14 17:45:24.579 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:24.580 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.020 seconds (success: True)
2024-04-14 17:45:26.597 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:26.597 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.037 seconds (success: True)

2024-04-14 17:45:28.580 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:28.580 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.021 seconds (success: True)
2024-04-14 17:45:30.583 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:30.583 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.023 seconds (success: True)
2024-04-14 17:45:32.582 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:32.582 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.022 seconds (success: True)
2024-04-14 17:45:34.597 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:34.598 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.037 seconds (success: True)
2024-04-14 17:45:36.588 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:36.589 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.030 seconds (success: True)
2024-04-14 17:45:38.593 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:38.594 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.034 seconds (success: True)
2024-04-14 17:45:40.586 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:40.586 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.023 seconds (success: True)
2024-04-14 17:45:42.592 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:42.592 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.033 seconds (success: True)

2024-04-14 17:45:44.581 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:44.582 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.022 seconds (success: True)

2024-04-14 17:45:46.592 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:46.593 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.033 seconds (success: True)
2024-04-14 17:45:48.584 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:48.584 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.024 seconds (success: True)

2024-04-14 17:45:50.587 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:50.587 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.028 seconds (success: True)

2024-04-14 17:45:52.581 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:45:52.582 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.022 seconds (success: True)

2024-04-14 17:50:46.598 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:50:46.599 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.039 seconds (success: True)

2024-04-14 17:50:48.592 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:50:48.593 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.034 seconds (success: True)

2024-04-14 17:50:50.583 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:50:50.584 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.024 seconds (success: True)

2024-04-14 17:50:52.598 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:50:52.599 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.039 seconds (success: True)

2024-04-14 17:50:54.589 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:50:54.590 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.031 seconds (success: True)

2024-04-14 17:50:56.588 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:50:56.588 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.027 seconds (success: True)

2024-04-14 17:50:58.586 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:50:58.586 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.026 seconds (success: True)

2024-04-14 17:51:00.581 ERROR (MainThread) [custom_components.oref_alert] Alert has an unrecognized area: 'ביר הדאג
2024-04-14 17:51:00.582 DEBUG (MainThread) [custom_components.oref_alert] Finished fetching oref_alert data in 0.023 seconds (success: True)

Diagnostics dump

No response

amitfin commented 6 months ago

This was a tricky one to debug, but eventually it's a bug of Pikud Ha-Oref. The alert is coming with a single quote as the first character of the area name instead of its last character: image

The area is spelled correctly in the metadata file of Pikud Ha-Oref which lists all areas.

I'll add a workaround: if the first character of the area name in the incoming alert is a single quote, put the character at the end of the name. (Ugly, but there is no much we can do about it.)

amitfin commented 6 months ago

Fixed by v2.11.0.