Skip to content

Commit

Permalink
Added wifi 5G support
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrErohin committed Mar 7, 2024
1 parent 2151151 commit a7614f1
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@ Home Assistant component for TP-Link router administration based on the [TP-Link

See [Supported routers](#supports)

<img src="https://raw.githubusercontent.com/AlexandrErohin/home-assistant-tplink-router/master/docs/media/sensors.png" width="70%">
<img src="https://raw.githubusercontent.com/AlexandrErohin/home-assistant-tplink-router/master/docs/media/sensors.png" width="48%"> <img src="https://raw.githubusercontent.com/AlexandrErohin/home-assistant-tplink-router/master/docs/media/switches.png" width="48%">

## Components
### Switches
- Router Reboot
- 2.4Ghz main wifi Enable/Disable
- 5Ghz main wifi Enable/Disable
- 6Ghz main wifi Enable/Disable
- 2.4Ghz guest wifi Enable/Disable
- 5Ghz guest wifi Enable/Disable
- 6Ghz guest wifi Enable/Disable
- 2.4Ghz IoT wifi network Enable/Disable
- 5Ghz IoT wifi network Enable/Disable
- 6Ghz IoT wifi network Enable/Disable

### Sensors
- Total amount of wired clients
Expand All @@ -24,7 +27,7 @@ See [Supported routers](#supports)
- Memory used

### Device Tracker
- Track clients by MAC address across 2.4Ghz, 5Ghz guest and main wifi with connection information
- Track clients by MAC address across 2.4Ghz, 5Ghz, 6Ghz guest and main wifi with connection information

To find your device - Go to `Developer tools` and search for your MAC address - you’ll find sensor like `device_tracker.YOUR_MAC` or `device_tracker.YOUR_PHONE_NAME`.

Expand Down
2 changes: 1 addition & 1 deletion custom_components/tplink_router/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/AlexandrErohin/home-assistant-tplink-router/issues",
"requirements": ["tplinkrouterc6u==3.3.0"],
"version": "1.9.0"
"version": "1.10.0"
}
24 changes: 24 additions & 0 deletions custom_components/tplink_router/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ class TPLinkRouterSwitchEntityDescription(SwitchEntityDescription, TPLinkRouterS
property='guest_5g_enable',
method=lambda coordinator, value: coordinator.set_wifi(Wifi.WIFI_GUEST_5G, value),
),
TPLinkRouterSwitchEntityDescription(
key="wifi_guest_6g",
name="Guest WIFI 6G",
icon="mdi:wifi",
entity_category=EntityCategory.CONFIG,
property='guest_6g_enable',
method=lambda coordinator, value: coordinator.set_wifi(Wifi.WIFI_GUEST_6G, value),
),
TPLinkRouterSwitchEntityDescription(
key="wifi_24g",
name="WIFI 2.4G",
Expand All @@ -57,6 +65,14 @@ class TPLinkRouterSwitchEntityDescription(SwitchEntityDescription, TPLinkRouterS
property='wifi_5g_enable',
method=lambda coordinator, value: coordinator.set_wifi(Wifi.WIFI_5G, value),
),
TPLinkRouterSwitchEntityDescription(
key="wifi_6g",
name="WIFI 6G",
icon="mdi:wifi",
entity_category=EntityCategory.CONFIG,
property='wifi_6g_enable',
method=lambda coordinator, value: coordinator.set_wifi(Wifi.WIFI_6G, value),
),
TPLinkRouterSwitchEntityDescription(
key="iot_24g",
name="IoT WIFI 2.4G",
Expand All @@ -73,6 +89,14 @@ class TPLinkRouterSwitchEntityDescription(SwitchEntityDescription, TPLinkRouterS
property='iot_5g_enable',
method=lambda coordinator, value: coordinator.set_wifi(Wifi.WIFI_IOT_5G, value),
),
TPLinkRouterSwitchEntityDescription(
key="iot_6g",
name="IoT WIFI 6G",
icon="mdi:wifi",
entity_category=EntityCategory.CONFIG,
property='iot_6g_enable',
method=lambda coordinator, value: coordinator.set_wifi(Wifi.WIFI_IOT_6G, value),
),
)


Expand Down
Binary file modified docs/media/sensors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/media/switches.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a7614f1

Please sign in to comment.