Skip to content

Commit

Permalink
fix(wifi): make get_saved_wifi_ssids return empty list in non-rpi e…
Browse files Browse the repository at this point in the history
…nvironments
  • Loading branch information
sassanh committed Feb 24, 2025
1 parent c495ce2 commit 4a02f42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- fix(wifi): wait a few seconds before creating the wifi connection if the provided input result has the input method `WEB_DASHBOARD` - closes #230
- fix(wifi): set `network_manager.wireless_enabled` for when hotspot is being turned off and also before creating a wifi connection and before connecting to a wifi network - closes #230
- fix(keypad,sensors): retry i2c initializations - closes #234
- fix(wifi): make `get_saved_wifi_ssids` return empty list in non-rpi environments

## Version 1.1.0

Expand Down
4 changes: 2 additions & 2 deletions ubo_app/services/090-web-ui/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ async def initialize(event: WebUIInitializeEvent) -> None:
extra_information=ReadableInformation(
text=(
'Please make sure you are on the same network as this '
f'ubo-pod and open http://{hostname}.local:{WEB_UI_LISTEN_PORT}'
'in your browser.'
'ubo-pod and open '
f'http://{hostname}.local:{WEB_UI_LISTEN_PORT} in your browser.'
if is_connected
else f'Please connect to the "{get_pod_id()}" WiFi network '
f'with password "{WEB_UI_HOTSPOT_PASSWORD}" and open '
Expand Down
3 changes: 3 additions & 0 deletions ubo_app/utils/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import subprocess

from ubo_app.logger import logger
from ubo_app.utils import IS_RPI


async def has_gateway() -> bool:
Expand Down Expand Up @@ -57,6 +58,8 @@ async def get_saved_wifi_ssids() -> list[str]:
list: List of saved Wi-Fi SSIDs or an empty list if none are found.
"""
if not IS_RPI:
return []
try:
process = await asyncio.create_subprocess_exec(
'nmcli',
Expand Down

0 comments on commit 4a02f42

Please sign in to comment.