Limych / ha-gismeteo

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

Sensors for current temperature and current humidity are not created as promised in Docs #192

Closed ildar170975 closed 2 weeks ago

ildar170975 commented 2 weeks 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 Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1414 Downloaded Repositories | 54 HACS Data | pending
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | pending can_reach_cloud | ok
Dashboards dashboards | 16 -- | -- resources | 39 views | 469 mode | storage
Recorder oldest_recorder_run | May 11, 2024 at 21:38 -- | -- current_recorder_run | May 18, 2024 at 04:17 estimated_db_size | 578.91 MiB database_engine | sqlite database_version | 3.44.2

Checklist

Describe the issue

According to Docs:

изображение

But with this config:

gismeteo:
  home_gismeteo:
    sensors: {}

only a weather entity is created:

изображение

Reproduction steps

see above

Debug logs

2024-05-18 04:17:19.507 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-18 04:17:21.657 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'narodmon', 'stt', 'iphonedetect', 'energy', 'template', 'search', 'input_boolean', 'system_health', 'input_number', 'input_datetime', 'input_button', 'places', 'season', 'history', 'hardware', 'image_upload', 'default_config', 'tag', 'openweathermap', 'custom_templates', 'diagnostics', 'version', 'media_source', 'notify', 'command_line', 'lock', 'counter', 'switch', 'zone', 'timer', 'application_credentials', 'file_upload', 'weather', 'persistent_notification', 'light', 'met', 'input_select', 'systemmonitor', 'analytics', 'schedule', 'intent', 'person', 'fontawesome', 'onboarding', 'script', 'backup', 'asuswrt', 'python_script', 'logbook', 'traccar_server', 'trace', 'mobile_app', 'map', 'hacs', 'group', 'input_text', 'composite', 'blueprint', 'filesize', 'uptime', 'lovelace', 'scene', 'ffmpeg', 'tts', 'device_automation', 'cover', 'gismeteo', 'ping', 'homeassistant_alerts', 'automation', 'fan', 'wake_word', 'starline', 'virtual', 'assist_pipeline', 'device_tracker', 'waze_travel_time', 'kodi', 'sun', 'sensor', 'stream', 'conversation', 'telegram_bot', 'config', 'my', 'simpleicons'}
2024-05-18 04:17:21.812 INFO (MainThread) [homeassistant.setup] Setting up gismeteo
2024-05-18 04:17:21.812 INFO (MainThread) [custom_components.gismeteo]
Gismeteo
https://github.com/Limych/ha-gismeteo/issues
2024-05-18 04:17:21.812 INFO (MainThread) [homeassistant.setup] Setup of domain gismeteo took 0.00 seconds
2024-05-18 04:17:22.430 DEBUG (MainThread) [custom_components.gismeteo.cache] Initializing cache
2024-05-18 04:17:22.430 DEBUG (MainThread) [custom_components.gismeteo.api] Place coordinates: xxx, xxx
2024-05-18 04:17:22.430 DEBUG (MainThread) [custom_components.gismeteo.api] Requesting URL https://services.gismeteo.ru/inform-service/inf_chrome/cities/?lat=xxx&lng=xxx&count=1&lang=en
2024-05-18 04:17:45.600 DEBUG (MainThread) [custom_components.gismeteo.api] Data retrieved from https://services.gismeteo.ru/inform-service/inf_chrome/cities/?lat=xxx&lng=xxx&count=1&lang=en, status: 200
2024-05-18 04:17:45.601 DEBUG (MainThread) [custom_components.gismeteo.cache] Store cache file /config/.storage/gismeteo.location_xxx_xxx.xml
2024-05-18 04:17:45.602 DEBUG (MainThread) [custom_components.gismeteo.api] Requesting URL https://services.gismeteo.ru/inform-service/inf_chrome/forecast/?city=xxxxx&lang=en
2024-05-18 04:17:48.819 DEBUG (MainThread) [custom_components.gismeteo.api] Data retrieved from https://services.gismeteo.ru/inform-service/inf_chrome/forecast/?city=xxxxx&lang=en, status: 200
2024-05-18 04:17:48.820 DEBUG (MainThread) [custom_components.gismeteo.cache] Store cache file /config/.storage/gismeteo.forecast_xxxxx.xml
2024-05-18 04:17:48.822 DEBUG (MainThread) [custom_components.gismeteo.api] Requesting URL https://services.gismeteo.ru/inform-service/inf_chrome/forecast/?city=xxxxx&lang=en
2024-05-18 04:17:48.823 DEBUG (MainThread) [custom_components.gismeteo.api] Cached response used
2024-05-18 04:17:48.823 DEBUG (MainThread) [custom_components.gismeteo.cache] Read cache file /config/.storage/gismeteo.forecast_xxxxx.xml
2024-05-18 04:17:48.825 DEBUG (MainThread) [custom_components.gismeteo.api] Requesting URL https://www.gismeteo.ru/weather-yyyyy-xxxxx/10-days/
2024-05-18 04:17:51.206 DEBUG (MainThread) [custom_components.gismeteo.api] Data retrieved from https://www.gismeteo.ru/weather-yyyyy-xxxxx/10-days/, status: 200
2024-05-18 04:17:51.213 DEBUG (MainThread) [custom_components.gismeteo.cache] Store cache file /config/.storage/gismeteo.forecast_parsed_xxxxx.xml
2024-05-18 04:17:51.323 DEBUG (MainThread) [custom_components.gismeteo] Finished fetching gismeteo data in 5.721 seconds (success: True)
2024-05-18 04:17:51.392 INFO (MainThread) [homeassistant.components.sensor] Setting up gismeteo.sensor
2024-05-18 04:17:51.392 INFO (MainThread) [homeassistant.components.weather] Setting up gismeteo.weather
2024-05-18 04:17:51.392 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new weather.gismeteo entity: weather.home_gismeteo
2024-05-18 04:19:58.840 WARNING (MainThread) [homeassistant.core] Something is blocking Home Assistant from wrapping up the start up phase. We're going to continue anyway. Please report the following info at https://github.com/home-assistant/core/issues: season.sensor, homeassistant.scene, systemmonitor.binary_sensor, repairs, stt, kodi.media_player, api, template, search, template.binary_sensor, template.switch, system_health, xiaomi_miio_airpurifier.fan, cloud.tts, iphonedetect.device_tracker, ssdp, input_button, snmp.sensor, auth, recorder, hardware, bluetooth, tag, openweathermap.sensor, openweathermap, diagnostics, custom_templates, version, media_source, systemmonitor.sensor, default_config, command_line, counter, switch, weather, file_upload, zeroconf, mobile_app.notify, met.weather, persistent_notification, starline.button, intent, person, system_log, backup, starline.sensor, starline.switch, netdata.sensor, openhardwaremonitor.sensor, python_script, version.binary_sensor, mobile_app.binary_sensor, traccar_server, template.fan, mobile_app, hacs, webhook, virtual.fan, starline.device_tracker, filesize, lovelace, virtual.lock, ping.device_tracker, device_automation, logger, gismeteo, cover, ping.binary_sensor, gismeteo.weather, virtual.light, wake_word, fan, history_stats.sensor, ping.sensor, starline, filesize.sensor, network, websocket_api, virtual, waze_travel_time, template.cover, sun.sensor, derivative.sensor, kodi, http, virtual.device_tracker, sensor, config, telegram_bot, my, simpleicons, google_translate.tts, command_line.sensor, binary_sensor, template.sensor, narodmon, iphonedetect, energy, input_boolean, input_number, uptime.sensor, telegram.notify, input_datetime, media_player, places, season, history, image_upload, usb, composite.device_tracker, notify, lock, zone, timer, application_credentials, websocket_api.sensor, light, met, input_select, systemmonitor, update, hacs.update, clear_grass.sensor, analytics, schedule, fontawesome, onboarding, mobile_app.device_tracker, script, asuswrt, logbook, trace, energy.sensor, map, integration.sensor, starline.lock, gismeteo.sensor, group, input_text, composite, homeassistant, blueprint, mobile_app.sensor, uptime, version.sensor, scene, ffmpeg, tts, homeassistant_alerts, ping, cloud, starline.binary_sensor, automation, hacs.sensor, button, dhcp, frontend, assist_pipeline, device_tracker, composite.sensor, sun, image, waze_travel_time.sensor, stream, conversation, openweathermap.weather, template.image, places.sensor The system is waiting for tasks: {<Task pending name='Task-3293' coro=<HacsBase.startup_tasks() running at /config/custom_components/hacs/base.py:687> wait_for=<_GatheringFuture pending cb=[Task.task_wakeup()]> cb=[set.remove()]>}
2024-05-18 04:22:51.141 DEBUG (MainThread) [custom_components.gismeteo.api] Requesting URL https://services.gismeteo.ru/inform-service/inf_chrome/forecast/?city=xxxxx&lang=en
2024-05-18 04:22:51.451 DEBUG (MainThread) [custom_components.gismeteo.api] Data retrieved from https://services.gismeteo.ru/inform-service/inf_chrome/forecast/?city=xxxxx&lang=en, status: 200
2024-05-18 04:22:51.452 DEBUG (MainThread) [custom_components.gismeteo.cache] Store cache file /config/.storage/gismeteo.forecast_xxxxx.xml
2024-05-18 04:22:51.454 DEBUG (MainThread) [custom_components.gismeteo] Finished fetching gismeteo data in 0.313 seconds (success: True)

Diagnostics dump

No response

Limych commented 2 weeks ago

Are you sure that sensors are not created at all? Or just disabled/hidden for some reason? During test runs, I had a similar situation only in the case when the entity registry was cluttered with old data.

ildar170975 commented 2 weeks ago

Are you sure that sensors are not created at all?

Just retested on a fresh 2024.5.3 setup. Only weather entity is created.

ildar170975 commented 2 weeks ago

For the record: beta4 - still only weather entity created.

Limych commented 2 weeks ago

Try to remove all Gismeteo integration settings through dashboard then restart HA.

ildar170975 commented 2 weeks ago

After every change in yaml file I remove all Gismeteo entries from "Settings->Integartion" and then reboot HA. This is what I always do for integrations which are configured in yaml and then shown in "Settings->Integartion"...

Limych commented 2 weeks ago

I can't reproduce the situation in devcontainer. I'm using your setup:

gismeteo:
  home_gismeteo:
    add_sensors: yes

... and everything works correctly: Screenshot from 2024-05-18 22-29-34 So, unfortunately, I can't help.

Limych commented 2 weeks ago

After every change in yaml file I remove all Gismeteo entries from "Settings->Integartion" and then reboot HA. This is what I always do for integrations which are configured in yaml and then shown in "Settings->Integartion"...

BTW, for my integrations, you can omit this step - they re-read the data from the yaml file every time they launch.

ildar170975 commented 2 weeks ago

I'm using your setup:

No no no, I am testing with a minimal setup- which used to be

gismeteo:
  home_gismeteo:
    sensors: {}

and now in beta4 it is

gismeteo:
  home_gismeteo:

It is defined in docs: изображение but I see only weather entity created.

ildar170975 commented 2 weeks ago

BTW, for my integrations, you can omit this step - they re-read the data from the yaml file every time they launch.

Interesting, will try this, thanks for info!

Limych commented 2 weeks ago

Oh... In this case, it's just an error in the description — if the add_sensors option is turned off, no sensors are created.

ildar170975 commented 2 weeks ago

if the add_sensors option is turned off, no sensors are created.

This is absolutely logical!

ildar170975 commented 2 weeks ago

Shall I close the issue? Or shall I leave it open to remind about fixing the redme?