Limych / ha-gismeteo

Gismeteo Weather Provider for Home Assistant
Other
116 stars 20 forks source link

Settings -> Repairs -> Integration startup time is shown as negative #191

Closed ildar170975 closed 1 month ago

ildar170975 commented 1 month ago

System Health details

System Information

version core-2024.5.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 5.10.0-16-amd64
arch x86_64
timezone Europe/Moscow
config_dir /config
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards error | failed to load: timeout -- | --

Checklist

Describe the issue

First I believed that this is a HA core issue & created https://github.com/home-assistant/core/issues/117530 There I was told that it could be a Gismeteo integration issue - that is why I made this issue here.

The issue: go to Settings -> Repairs -> Integration startup time, a negative value is shown:

изображение

Quote from a Dev:

It wouldn’t make sense to try to work out the timings for a component that doesn’t await its platform setups since it has a much larger problem that it could get reloaded while its platforms are being setup. Once the component fixes that the timings will be correct.Since the custom component runs at the same privilege level as HA, there is nothing we can do to prevent a custom component from loading platforms without awaiting their setup. IMHO, it’s a good thing that it returns a nonsensical result since it makes it obvious there is a problem with the custom component that needs to be fixed as otherwise it would have probably gone unnoticed

Reproduction steps

go to Settings -> Repairs -> Integration startup time

Debug logs

2024-05-17 03:47:34.241 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration gismeteo 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-05-17 03:47:37.929 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'cover', 'energy', 'counter', 'homeassistant_alerts', 'systemmonitor', 'asuswrt', 'weather', 'ffmpeg', 'template', 'fan', 'mobile_app', 'conversation', 'history', 'application_credentials', 'iphonedetect', 'command_line', 'input_button', 'input_boolean', 'composite', 'system_health', 'device_tracker', 'timer', 'python_script', 'zone', 'tts', 'config', 'scene', 'switch', 'group', 'person', 'image_upload', 'assist_pipeline', 'traccar_server', 'schedule', 'custom_templates', 'lock', 'analytics', 'hacs', 'file_upload', 'diagnostics', 'backup', 'season', 'simpleicons', 'gismeteo', 'input_datetime', 'met', 'logbook', 'device_automation', 'version', 'onboarding', 'ping', 'input_text', 'media_source', 'light', 'stt', 'sensor', 'sun', 'persistent_notification', 'search', 'input_number', 'notify', 'kodi', 'openweathermap', 'intent', 'map', 'starline', 'stream', 'automation', 'filesize', 'input_select', 'trace', 'lovelace', 'fontawesome', 'blueprint', 'wake_word', 'tag', 'uptime', 'places', 'script', 'telegram_bot', 'default_config', 'virtual', 'hardware', 'my', 'narodmon', 'waze_travel_time'}
2024-05-17 03:47:40.150 INFO (MainThread) [homeassistant.setup] Setting up gismeteo
2024-05-17 03:47:40.151 INFO (MainThread) [custom_components.gismeteo]
Gismeteo
https://github.com/Limych/ha-gismeteo/issues
2024-05-17 03:47:40.151 INFO (MainThread) [homeassistant.setup] Setup of domain gismeteo took 0.00 seconds
2024-05-17 03:47:40.151 DEBUG (MainThread) [custom_components.gismeteo.api] Place coordinates: xxxxxxxxxx, xxxxxxxxxx
2024-05-17 03:47:40.151 DEBUG (MainThread) [custom_components.gismeteo.api] Forecast mode: hourly
2024-05-17 03:47:40.151 DEBUG (MainThread) [custom_components.gismeteo.cache] Initializing cache
2024-05-17 03:47:40.151 DEBUG (MainThread) [custom_components.gismeteo.api] Requesting URL https://services.gismeteo.ru/inform-service/inf_chrome/cities/?lat=xxxxxxxxxx&lng=xxxxxxxxxx&count=1&lang=en
2024-05-17 03:47:40.151 DEBUG (MainThread) [custom_components.gismeteo.cache] Read cache file /config/.storage/location_xxxxxxxxxx_xxxxxxxxxx.xml
2024-05-17 03:47:40.157 DEBUG (MainThread) [custom_components.gismeteo.api] Cached response used
2024-05-17 03:47:40.158 DEBUG (MainThread) [custom_components.gismeteo.api] Requesting URL https://services.gismeteo.ru/inform-service/inf_chrome/forecast/?city=xxxxxxxxxx&lang=en
2024-05-17 03:47:40.158 DEBUG (MainThread) [custom_components.gismeteo.cache] Read cache file /config/.storage/forecast_xxxxxxxxxx.xml
2024-05-17 03:47:40.159 DEBUG (MainThread) [custom_components.gismeteo.api] Cached response used
2024-05-17 03:47:40.160 DEBUG (MainThread) [custom_components.gismeteo] Finished fetching gismeteo data in 0.002 seconds (success: True)
2024-05-17 03:47:53.911 INFO (MainThread) [homeassistant.components.weather] Setting up gismeteo.weather
2024-05-17 03:47:54.786 INFO (MainThread) [homeassistant.components.sensor] Setting up gismeteo.sensor
2024-05-17 03:52:53.449 DEBUG (MainThread) [custom_components.gismeteo.api] Requesting URL https://services.gismeteo.ru/inform-service/inf_chrome/forecast/?city=xxxxxxxxxx&lang=en
2024-05-17 03:52:53.450 DEBUG (MainThread) [custom_components.gismeteo.cache] Read cache file /config/.storage/forecast_xxxxxxxxxx.xml
2024-05-17 03:52:53.491 DEBUG (MainThread) [custom_components.gismeteo.api] Data retrieved from https://services.gismeteo.ru/inform-service/inf_chrome/forecast/?city=xxxxxxxxxx&lang=en, status: 200
2024-05-17 03:52:53.492 DEBUG (MainThread) [custom_components.gismeteo.cache] Store cache file /config/.storage/forecast_xxxxxxxxxx.xml
2024-05-17 03:52:53.493 DEBUG (MainThread) [custom_components.gismeteo] Finished fetching gismeteo data in 0.044 seconds (success: True)

Diagnostics dump

No response

Limych commented 1 month ago

It's not an integration issue.

ildar170975 commented 1 month ago

@Limych

It's not an integration issue.

Have you:

  1. Read a comment of HA developer I provided above? Have you discussed the issue with HA devs?
  2. Have you checked the Gismeteo integration's code to ensure that this "not an integration issue"?

I am asking because if both sides (you & HA devs) refuse to check themselves - the bug will still be there, not productive.

Limych commented 1 month ago

@ildar170975 To make it clearer for you: 1) this integration is being developed as an open source project. It is provided “as is” without any guarantees or obligations on the part of the developer (that is, me); 2) the integration does not measure its start time in any way and does not affect these measurements in any way - all this is done by the system kernel code (if they need it); 3) yes, the time in your picture is strange, but this does not in any way affect the correctness of work of the integration. This means this is NOT an integration issue.

If it is so important for you to solve this problem, I suggest you figure out the cause of the error yourself and open a PR to fix it.

I consider this discussion to be over.

ildar170975 commented 1 month ago

Цирк какой-то ))) Интеграция должна следовать неким правилам песочницы. Если она НЕ следует, если это вызывает проблемы взаимодействия HA с интеграцией и автор интеграции не желает в этом разбираться - это не круто.

Limych commented 1 month ago

Пришлите PR — будет круто. А то, я смотрю, Вы только обвинять других в некомпетентности горазды...

ildar170975 commented 1 month ago

Вы только обвинять других в некомпетентности горазды...

Не надо передергивать, тут

because if both sides (you & HA devs) refuse to check themselves - the bug will still be there, not productive.

не было никаких обвинений, пока вы не проигнорировали мой вопрос про "обсудить с разрабами" и вообще отказались это обсуждать. Так что делайте выводы.

И в целом пассаж про "Вы только обвинять других в некомпетентности горазды..." гнусно попахивает максимализмом и нежеланием разбираться. Вы понятия не имеете. с кем общаетесь. поэтому не надо про "только ... горазды"