Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
HomeAssistant
Core
Commits
989c3581
Commit
989c3581
authored
5 years ago
by
Michał Mrozek
Committed by
Martin Hjelmare
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Move imports in tplink_lte component (#27583)
parent
627ca318
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
homeassistant/components/tplink_lte/__init__.py
+1
-2
1 addition, 2 deletions
homeassistant/components/tplink_lte/__init__.py
homeassistant/components/tplink_lte/notify.py
+1
-1
1 addition, 1 deletion
homeassistant/components/tplink_lte/notify.py
with
2 additions
and
3 deletions
homeassistant/components/tplink_lte/__init__.py
+
1
−
2
View file @
989c3581
...
@@ -4,6 +4,7 @@ import logging
...
@@ -4,6 +4,7 @@ import logging
import
aiohttp
import
aiohttp
import
attr
import
attr
import
tp_connected
import
voluptuous
as
vol
import
voluptuous
as
vol
from
homeassistant.const
import
(
from
homeassistant.const
import
(
...
@@ -106,7 +107,6 @@ async def async_setup(hass, config):
...
@@ -106,7 +107,6 @@ async def async_setup(hass, config):
async
def
_setup_lte
(
hass
,
lte_config
,
delay
=
0
):
async
def
_setup_lte
(
hass
,
lte_config
,
delay
=
0
):
"""
Set up a TP-Link LTE modem.
"""
"""
Set up a TP-Link LTE modem.
"""
import
tp_connected
host
=
lte_config
[
CONF_HOST
]
host
=
lte_config
[
CONF_HOST
]
password
=
lte_config
[
CONF_PASSWORD
]
password
=
lte_config
[
CONF_PASSWORD
]
...
@@ -145,7 +145,6 @@ async def _login(hass, modem_data, password):
...
@@ -145,7 +145,6 @@ async def _login(hass, modem_data, password):
async
def
_retry_login
(
hass
,
modem_data
,
password
):
async
def
_retry_login
(
hass
,
modem_data
,
password
):
"""
Sleep and retry setup.
"""
"""
Sleep and retry setup.
"""
import
tp_connected
_LOGGER
.
warning
(
"
Could not connect to %s. Will keep trying.
"
,
modem_data
.
host
)
_LOGGER
.
warning
(
"
Could not connect to %s. Will keep trying.
"
,
modem_data
.
host
)
...
...
This diff is collapsed.
Click to expand it.
homeassistant/components/tplink_lte/notify.py
+
1
−
1
View file @
989c3581
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
import
logging
import
logging
import
attr
import
attr
import
tp_connected
from
homeassistant.components.notify
import
ATTR_TARGET
,
BaseNotificationService
from
homeassistant.components.notify
import
ATTR_TARGET
,
BaseNotificationService
from
homeassistant.const
import
CONF_RECIPIENT
from
homeassistant.const
import
CONF_RECIPIENT
...
@@ -27,7 +28,6 @@ class TplinkNotifyService(BaseNotificationService):
...
@@ -27,7 +28,6 @@ class TplinkNotifyService(BaseNotificationService):
async
def
async_send_message
(
self
,
message
=
""
,
**
kwargs
):
async
def
async_send_message
(
self
,
message
=
""
,
**
kwargs
):
"""
Send a message to a user.
"""
"""
Send a message to a user.
"""
import
tp_connected
modem_data
=
self
.
hass
.
data
[
DATA_KEY
].
get_modem_data
(
self
.
config
)
modem_data
=
self
.
hass
.
data
[
DATA_KEY
].
get_modem_data
(
self
.
config
)
if
not
modem_data
:
if
not
modem_data
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment