Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent switch is not created during setup #446

Open
2 tasks done
HACucoo opened this issue Oct 7, 2024 · 2 comments
Open
2 tasks done

Silent switch is not created during setup #446

HACucoo opened this issue Oct 7, 2024 · 2 comments
Labels
Bug check for Bug it is checked whether there is an Bug Version 2 wait in examination

Comments

@HACucoo
Copy link

HACucoo commented Oct 7, 2024

What version of Integration has the issue?

2.13.11

System Health details

System Information

version core-2024.10.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.46-haos
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 4981
Installed Version 2.0.1
Stage running
Available Repositories 1431
Downloaded Repositories 22
Home Assistant Cloud
logged_in true
subscription_expiration 16. Oktober 2024 um 02:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled false
remote_server eu-central-1-16.ui.nabu.casa
certificate_status ready
instance_id e34fae38ae4e4ba1917143d72bf3acfe
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 13.1
update_channel stable
supervisor_version supervisor-2024.09.1
agent_version 1.6.0
docker_version 26.1.4
disk_total 28.0 GB
disk_used 7.2 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board green
supervisor_api ok
version_api ok
installed_addons Home Assistant Google Drive Backup (0.112.1), Terminal & SSH (9.15.0), Samba share (12.3.2), Mosquitto broker (6.4.1), RPC Shutdown (2.5), Fusion (2024.7.1)
Dashboards
dashboards 6
resources 12
views 9
mode storage
Recorder
oldest_recorder_run 28. September 2024 um 06:35
current_recorder_run 7. Oktober 2024 um 15:25
estimated_db_size 143.45 MiB
database_engine sqlite
database_version 3.45.3
Xiaomi Miot Auto
component_version 0.7.20
can_reach_server ok
can_reach_spec ok
logged_accounts 1
total_devices 12

Checklist

  • I have enabled debug logging for my installation.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).

Describe the issue

I'm having trouble with the "Silent" switch.

When first configuring the watch, I had 5 silents set up in the Xplora app (because my kid has different school end times each day). Only one of them showed up in Home Assistant as a switch entity.

I was trying to fix this by deleting all silent times in the app and setting up one generic one (8 - 16h). My thought process was to just automate enabling and disabling the silent switch since my HA knows about school and other holidays already.

My problem is that now NO silent switch is being set up at all. I've tried

  • deleting the watch and re-adding it
  • deleting the integration, redownloading and re-adding the watch

I rebooted home assistant between every step.

How can I get it to set up the silent switch again?

Reproduction steps

  1. Delete silent switch entity
  2. Configure watch - no silent switch can be added from the sensor drop down
  3. Re-install through HACS - still no silent sensor

Debug logs

2024-10-07 15:28:57.799 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to scandir with args (21,) inside the event loop by custom integration 'xplora_watch' at custom_components/xplora_watch/helper.py, line 110: shutil.rmtree(f"{dst_path}/emojis") (offender: /usr/local/lib/python3.12/shutil.py, line 686: with os.scandir(topfd) as scandir_it:), please create a bug report at https://github.com/Ludy87/xplora_watch/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#scandir
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 742, in async_setup_locked
    await self.async_setup(hass, integration=integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/xplora_watch/__init__.py", line 62, in async_setup_entry
    move_emojis_directory(hass)
  File "/config/custom_components/xplora_watch/helper.py", line 110, in move_emojis_directory
    shutil.rmtree(f"{dst_path}/emojis")

2024-10-07 15:28:57.842 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'xplora_watch' calls async_forward_entry_setup for integration, xplora_watch with title: Xplora® and entry_id: 01J9KJP7DTFV1GNBKPEGMMRKB2, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/xplora_watch/__init__.py, line 67: hass.async_create_task(hass.config_entries.async_forward_entry_setup(entry, platform)), please create a bug report at https://github.com/Ludy87/xplora_watch/issues
2024-10-07 15:28:57.947 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration xplora_watch with title: Xplora® and entry_id: 01J9KJP7DTFV1GNBKPEGMMRKB2, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2223, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1192, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 155, in report
    _LOGGER.warning(msg, stack_info=True)
2024-10-07 15:28:57.956 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration xplora_watch with title: Xplora® and entry_id: 01J9KJP7DTFV1GNBKPEGMMRKB2, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2223, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1192, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 155, in report
    _LOGGER.warning(msg, stack_info=True)
2024-10-07 15:28:57.972 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration xplora_watch with title: Xplora® and entry_id: 01J9KJP7DTFV1GNBKPEGMMRKB2, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2223, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1192, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 155, in report
    _LOGGER.warning(msg, stack_info=True)
2024-10-07 15:28:57.992 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration xplora_watch with title: Xplora® and entry_id: 01J9KJP7DTFV1GNBKPEGMMRKB2, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2223, in async_forward_entry_setup
    _report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1192, in _report_non_awaited_platform_forwards
    report(
  File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 155, in report
    _LOGGER.warning(msg, stack_info=True)
@HACucoo HACucoo added Bug Version 2 wait in examination labels Oct 7, 2024
Copy link
Contributor

github-actions bot commented Oct 7, 2024

👋 @HACucoo, it is checked whether there is a bug. Please have some patience.
This action was performed automatically.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Thanks for opening this issue!
I have applied any labels matching special text in your title and description.

@Ludy87: Please review the labels and make any necessary changes.

@github-actions github-actions bot added the check for Bug it is checked whether there is an Bug label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug check for Bug it is checked whether there is an Bug Version 2 wait in examination
Projects
None yet
Development

No branches or pull requests

1 participant