Skip to content

Commit

Permalink
Merge pull request #48 from dmamontov/dev
Browse files Browse the repository at this point in the history
New version
  • Loading branch information
dmamontov authored Apr 22, 2022
2 parents 0988922 + 9539005 commit c28e657
Show file tree
Hide file tree
Showing 19 changed files with 629 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: dmamontov/hass-py-lint@main
with:
hass-version: ">=2022.3.0"
hass-version: ">=2022.4.0"
path: "custom_components/miwifi"
extra-pylint-options: "--disable=unused-argument"

Expand Down
76 changes: 40 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ Many more Xiaomi and Redmi routers supported by MiWiFi (OpenWRT - Luci API)

##### Additional
- `misystem/topo_graph` - Topography, auto discovery does not work without it.
- `xqsystem/check_rom_update` - Getting information about a firmware update
- `xqnetwork/wan_info` - WAN port information.
- `misystem/led` - Interaction with LEDs.
- `xqnetwork/wifi_detail_all` - Getting information about WiFi adapters
- `xqnetwork/wifi_diag_detail_all` - Getting information about WiFi adapters
- `xqnetwork/avaliable_channels` - Gets available channels for WiFi adapter
- `xqnetwork/wifi_connect_devices` - Get information about connected devices
- `misystem/devicelist` - More information about connected devices
Expand All @@ -116,7 +117,10 @@ Many more Xiaomi and Redmi routers supported by MiWiFi (OpenWRT - Luci API)

##### Action
- `xqsystem/reboot` - Reboot
- `xqsystem/upgrade_rom` - Firmware update.
- `xqsystem/flash_permission` - Clear permission. Required only for firmware updates.
- `xqnetwork/set_wifi` - Update WiFi settings. Causes the adapter to reboot.
- `xqnetwork/set_wifi_without_restart` - Update Guest WiFi settings.

❗ If your router is not listed or not tested, try adding an integration, it will check everything and give a link to create an issue. You just have to click `Submit new issue`

Expand All @@ -128,41 +132,41 @@ Many more Xiaomi and Redmi routers supported by MiWiFi (OpenWRT - Luci API)
- 🔴 - Not supported
- ⚪ - Not tested

| Image | Router | Code | Required API | Additional API | Action API |
| ------------------------ | -------------------------------------- |:------:|:------------------:|:--------------------------:|:---------------:|
| ![](images/RA70.png) | **Xiaomi Router Xiaomi AX9000** | RA70 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RA72.png) | **Xiaomi Router AX6000** | RA72 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RB06.png) | **Redmi Router AX6000** | RB06 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RA80.png) | **Xiaomi Mesh System AX3000** | RA82 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RA80.png) | **Xiaomi Router AX3000** | RA80 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RB03.png) | **Redmi Router AX6S** | RB03 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RA81.png) | **Redmi Router AX3000** | RA81 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RA71.png) | **Redmi Router AX1800** | RA71 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RA69.png) | **Redmi Router AX6** | RA69 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RA67.png) | **Redmi Router AX5** | RA67 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RA50.png) | **Redmi Router AX5** | RA50 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/AX1800.png) | **Mi Router AX1800** | RM1800 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/AX3600.png) | **Xiaomi AIoT Router AX3600** | R3600 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/RM2100.png) | **Redmi Router AC2100** | RM2100 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/R2100.png) | **Mi Router AC2100** | R2100 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/R1350.png) | **Mi Router 4 Pro** | R1350 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/R2350.png) | **Mi AIoT Router AC2350** | R2350 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢</sub> |
| ![](images/D01.png) | **Mi Router Mesh** | D01 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R4AC.png) | **Mi Router 4A** | R4AC | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R4A.png) | **Mi Router 4A Gigabit** | R4A | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R4CM.png) | **Mi Router 4C** | R4CM | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R4.png) | **Mi Router 4** | R4 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R4C.png) | **Mi Router 4Q** | R4C | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R3L.png) | **Mi Router 3A** | R3A | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R3L.png) | **Mi Router 3C** | R3L | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R3D.png) | **Mi Router HD** | R3D | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/r3p.png) | **Mi Router Pro** | R3P | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R3.png) | **Mi Router 3** | R3 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R3.png) | **Mi Router 3G** | R3G | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R1CL.png) | **Mi Router Lite** | R1CL | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R1C.png) | **Mi Router Mini** | R1CM | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R2D.png) | **Mi Router R2D** | R2D | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| ![](images/R1D.png) | **Mi Router R1D** | R1D | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢</sub> |
| Image | Router | Code | Required | Additional | Action |
| ------------------------ | -------------------------------------- |:------:|:------------------:|:----------------------------:|:--------------------:|
| ![](images/RA70.png) | **Xiaomi Router Xiaomi AX9000** | RA70 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RA72.png) | **Xiaomi Router AX6000** | RA72 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RB06.png) | **Redmi Router AX6000** | RB06 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RA80.png) | **Xiaomi Mesh System AX3000** | RA82 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RA80.png) | **Xiaomi Router AX3000** | RA80 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RB03.png) | **Redmi Router AX6S** | RB03 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RA81.png) | **Redmi Router AX3000** | RA81 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RA71.png) | **Redmi Router AX1800** | RA71 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RA69.png) | **Redmi Router AX6** | RA69 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RA67.png) | **Redmi Router AX5** | RA67 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RA50.png) | **Redmi Router AX5** | RA50 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/AX1800.png) | **Mi Router AX1800** | RM1800 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/AX3600.png) | **Xiaomi AIoT Router AX3600** | R3600 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/RM2100.png) | **Redmi Router AC2100** | RM2100 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R2100.png) | **Mi Router AC2100** | R2100 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R1350.png) | **Mi Router 4 Pro** | R1350 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R2350.png) | **Mi AIoT Router AC2350** | R2350 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/D01.png) | **Mi Router Mesh** | D01 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R4AC.png) | **Mi Router 4A** | R4AC | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R4A.png) | **Mi Router 4A Gigabit** | R4A | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R4CM.png) | **Mi Router 4C** | R4CM | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R4.png) | **Mi Router 4** | R4 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R4C.png) | **Mi Router 4Q** | R4C | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R3L.png) | **Mi Router 3A** | R3A | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R3L.png) | **Mi Router 3C** | R3L | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R3D.png) | **Mi Router HD** | R3D | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/r3p.png) | **Mi Router Pro** | R3P | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R3.png) | **Mi Router 3** | R3 | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R3.png) | **Mi Router 3G** | R3G | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R1CL.png) | **Mi Router Lite** | R1CL | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R1C.png) | **Mi Router Mini** | R1CM | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R2D.png) | **Mi Router R2D** | R2D | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |
| ![](images/R1D.png) | **Mi Router R1D** | R1D | <sub>🟢🟢🟢🟢</sub> | <sub>🟢🟢🟢🟢🟢🟢🟢🟢🟢🔴</sub> | <sub>🟢🟢🟢🟢🟢</sub> |

## Diagnostics
You will need to obtain diagnostic data to search for a problem or before creating an issue.
Expand Down
18 changes: 12 additions & 6 deletions custom_components/miwifi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
EVENT_HOMEASSISTANT_STOP,
)
from homeassistant.core import HomeAssistant, Event, CALLBACK_TYPE
from homeassistant.exceptions import PlatformNotReady
from homeassistant.helpers.storage import Store

from .const import (
Expand Down Expand Up @@ -84,18 +85,18 @@ async def async_start(with_sleep: bool = False) -> None:
:param with_sleep: bool
"""

await _updater.update(True)
await _updater.async_config_entry_first_refresh()
if not _updater.last_update_success:
if _updater.last_exception is not None:
raise PlatformNotReady from _updater.last_exception

raise PlatformNotReady

if with_sleep:
await asyncio.sleep(DEFAULT_SLEEP)

hass.config_entries.async_setup_platforms(entry, PLATFORMS)

async def async_stop(event: Event) -> None:
"""Async stop"""

await _updater.async_stop()

if is_new:
await async_start()
await asyncio.sleep(DEFAULT_SLEEP)
Expand All @@ -105,6 +106,11 @@ async def async_stop(event: Event) -> None:
lambda: hass.async_create_task(async_start(True)),
)

async def async_stop(event: Event) -> None:
"""Async stop"""

await _updater.async_stop()

hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, async_stop)

return True
Expand Down
8 changes: 4 additions & 4 deletions custom_components/miwifi/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ async def async_setup_entry(
data: dict = hass.data[DOMAIN][config_entry.entry_id]
updater: LuciUpdater = data[UPDATER]

if not updater.data.get(ATTR_DEVICE_MAC_ADDRESS, False):
_LOGGER.error(
"Failed to initialize binary sensor: Missing mac address. Restart HASS."
)
if not updater.last_update_success:
_LOGGER.error("Failed to initialize binary sensor.")

return

entities: list[MiWifiBinarySensor] = [
MiWifiBinarySensor(
Expand Down
6 changes: 4 additions & 2 deletions custom_components/miwifi/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ async def async_setup_entry(
data: dict = hass.data[DOMAIN][config_entry.entry_id]
updater: LuciUpdater = data[UPDATER]

if not updater.data.get(ATTR_DEVICE_MAC_ADDRESS, False):
_LOGGER.error("Failed to initialize button: Missing mac address. Restart HASS.")
if not updater.last_update_success:
_LOGGER.error("Failed to initialize button.")

return

entities: list[MiWifiButton] = [
MiWifiButton(
Expand Down
4 changes: 3 additions & 1 deletion custom_components/miwifi/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ async def async_setup_entry(
data: dict = hass.data[DOMAIN][config_entry.entry_id]
updater: LuciUpdater = data[UPDATER]

if not updater.data.get(ATTR_DEVICE_MAC_ADDRESS, False):
if not updater.last_update_success:
_LOGGER.error("Failed to initialize camera: Missing mac address. Restart HASS.")

return

entities: list[MiWifiCamera] = [
MiWifiCamera(
f"{config_entry.entry_id}-{description.key}",
Expand Down
18 changes: 18 additions & 0 deletions custom_components/miwifi/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
Platform.SELECT,
Platform.DEVICE_TRACKER,
Platform.CAMERA,
Platform.UPDATE,
]

"""Discovery const"""
Expand Down Expand Up @@ -91,6 +92,7 @@
ATTR_WIFI_2_4_DATA: Final = "wifi_2_4_data"
ATTR_WIFI_5_0_DATA: Final = "wifi_5_0_data"
ATTR_WIFI_5_0_GAME_DATA: Final = "wifi_5_0_game_data"
ATTR_WIFI_GUEST_DATA: Final = "wifi_guest_data"

ATTR_WIFI_ADAPTER_LENGTH: Final = "wifi_adapter_length"

Expand Down Expand Up @@ -162,6 +164,9 @@
ATTR_SWITCH_WIFI_5_0_GAME: Final = "wifi_5_0_game"
ATTR_SWITCH_WIFI_5_0_GAME_NAME: Final = f"{ATTR_WIFI_NAME} 5G game"

ATTR_SWITCH_WIFI_GUEST: Final = "wifi_guest"
ATTR_SWITCH_WIFI_GUEST_NAME: Final = f"{ATTR_WIFI_NAME} guest"

"""Select attributes"""
ATTR_SELECT_WIFI_2_4_CHANNEL: Final = "wifi_2_4_channel"
ATTR_SELECT_WIFI_2_4_CHANNELS: Final = "wifi_2_4_channels"
Expand Down Expand Up @@ -213,4 +218,17 @@
ATTR_TRACKER_DOWN_SPEED: Final = "down_speed"
ATTR_TRACKER_UP_SPEED: Final = "up_speed"
ATTR_TRACKER_LAST_ACTIVITY: Final = "last_activity"
ATTR_TRACKER_OPTIONAL_MAC: Final = "optional_mac"

"""Update attributes"""
ATTR_UPDATE_FIRMWARE: Final = "firmware"
ATTR_UPDATE_FIRMWARE_NAME: Final = "Firmware update"

ATTR_UPDATE_TITLE: Final = "title"
ATTR_UPDATE_CURRENT_VERSION: Final = "current_version"
ATTR_UPDATE_LATEST_VERSION: Final = "latest_version"
ATTR_UPDATE_RELEASE_URL: Final = "release_url"
ATTR_UPDATE_DOWNLOAD_URL: Final = "download_url"
ATTR_UPDATE_FILE_SIZE: Final = "file_size"
ATTR_UPDATE_FILE_HASH: Final = "file_hash"
# fmt: on
Loading

0 comments on commit c28e657

Please sign in to comment.