andrew-codechimp / HA-Battery-Notes

A Home Assistant integration to provide battery notes of devices
MIT License
447 stars 83 forks source link

Detected blocking call to open inside the event loop by custom integration 'battery_notes' #1703

Closed iridris closed 1 month ago

iridris commented 1 month ago

System Health details

System Information

version core-2024.6.0b0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.29-haos
arch x86_64
timezone America/New_York
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 | 1398 Downloaded Repositories | 28 HACS Data | ok
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | April 27, 2025 at 8:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | false remote_connected | false alexa_enabled | false google_enabled | false remote_server | us-east-1-10.ui.nabu.casa certificate_status | ready instance_id | e5fc0ac74e694620871ded35ea147a8a can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.3 -- | -- update_channel | beta supervisor_version | supervisor-2024.05.2 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 78.0 GB disk_used | 54.6 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | vmware board | ova supervisor_api | ok version_api | ok installed_addons | Samba share (12.3.1), SQLite Web (4.1.2), Advanced SSH & Web Terminal (18.0.0), InfluxDB (5.0.0), File editor (5.8.0), ESPHome (2024.5.4), Mosquitto broker (6.4.1), rtlamr2mqtt (2.3.4), Z-Wave JS UI (3.6.0), Zigbee2MQTT (1.37.1-1), MQTT Explorer (browser-1.0.1), Glances (0.21.1), Frigate Proxy (1.5), Piper (1.5.0), Studio Code Server (5.15.0), Duplicati add-on (0.1.13), Firefox (Edge) (1.2.0), ZigStar TI CC2652P/P7 FW Flasher (0.4.0), Nginx Proxy Manager (1.0.1), Music Assistant (2.0.4)
Dashboards dashboards | 12 -- | -- resources | 14 views | 42 mode | storage
Recorder oldest_recorder_run | April 29, 2024 at 3:04 PM -- | -- current_recorder_run | May 29, 2024 at 3:10 PM estimated_db_size | 2321.70 MiB database_engine | sqlite database_version | 3.44.2

Checklist

Describe the issue

After updating to HA Core 2024.6.0b0, warnings are logged about blocking call to open inside the event loop.

Reproduction steps

  1. Update HA to new beta version 2024.6.0b0
  2. Check logs to see warnings

Debug logs

2024-05-29 15:10:21.067 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'battery_notes' at custom_components/battery_notes/library_updater.py, line 91: with open(json_path, "w", encoding="utf-8") as file: (offender: /config/custom_components/battery_notes/library_updater.py, line 91: with open(json_path, "w", encoding="utf-8") as file:), please create a bug report at https://github.com/andrew-codechimp/ha-battery-notes/issues
2024-05-29 15:10:21.071 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'battery_notes' at custom_components/battery_notes/library.py, line 64: with open(json_default_path, encoding="utf-8") as default_file: (offender: /config/custom_components/battery_notes/library.py, line 64: with open(json_default_path, encoding="utf-8") as default_file:), please create a bug report at https://github.com/andrew-codechimp/ha-battery-notes/issues

Diagnostics dump

No response

andrew-codechimp commented 1 month ago

Should be fixed in 2.3.3 just released to beta.