Skip to content

Commit

Permalink
Added default host to configuration GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrErohin committed Nov 15, 2023
1 parent 1f5928f commit d3cf9d7
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Have [HACS](https://hacs.xyz/) installed, this will allow you to update easily.
## Configuration
TP-Link Router is configured via the GUI. See [the HA docs](https://www.home-assistant.io/getting-started/integration/) for more details.

The default data is preset already

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

1. Go to the <b>Settings</b>-><b>Devices & services</b>.
Expand Down
2 changes: 1 addition & 1 deletion custom_components/tplink_router/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

STEP_USER_DATA_SCHEMA = vol.Schema(
{
vol.Required(CONF_HOST): str,
vol.Required(CONF_HOST, default='192.168.0.1'): str,
vol.Required(CONF_USERNAME, default='admin'): str,
vol.Required(CONF_PASSWORD): str,
vol.Required(CONF_SCAN_INTERVAL, default=30): int,
Expand Down
1 change: 1 addition & 0 deletions custom_components/tplink_router/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def __init__(
self.firmware = info[0]
self.status = info[1]
self.device_info = DeviceInfo(
configuration_url=f"http://{router.host}/",
connections={(CONNECTION_NETWORK_MAC, self.status.macaddr)},
identifiers={(DOMAIN, self.status.macaddr)},
manufacturer="TPLink",
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 @@ -3,7 +3,7 @@
"name": "TP-Link Router",
"documentation": "https://github.com/AlexandrErohin/home-assistant-tplink_router",
"requirements": ["tplinkrouterc6u>=0.0.1"],
"version": "0.0.1",
"version": "0.0.2",
"config_flow": true,
"codeowners": ["@AlexandrErohin"]
}
Expand Down
Binary file modified docs/media/config_flow.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 modified docs/media/sensor.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 d3cf9d7

Please sign in to comment.