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
612a37b2
Commit
612a37b2
authored
6 years ago
by
c727
Committed by
Fabian Affolter
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove simplepush.io (#14358)
parent
d47006c9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.coveragerc
+0
-1
0 additions, 1 deletion
.coveragerc
homeassistant/components/notify/simplepush.py
+0
-59
0 additions, 59 deletions
homeassistant/components/notify/simplepush.py
requirements_all.txt
+0
-3
0 additions, 3 deletions
requirements_all.txt
with
0 additions
and
63 deletions
.coveragerc
+
0
−
1
View file @
612a37b2
...
...
@@ -540,7 +540,6 @@ omit =
homeassistant/components/notify/rest.py
homeassistant/components/notify/rocketchat.py
homeassistant/components/notify/sendgrid.py
homeassistant/components/notify/simplepush.py
homeassistant/components/notify/slack.py
homeassistant/components/notify/smtp.py
homeassistant/components/notify/stride.py
...
...
This diff is collapsed.
Click to expand it.
homeassistant/components/notify/simplepush.py
deleted
100644 → 0
+
0
−
59
View file @
d47006c9
"""
Simplepush notification service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.simplepush/
"""
import
logging
import
voluptuous
as
vol
import
homeassistant.helpers.config_validation
as
cv
from
homeassistant.components.notify
import
(
ATTR_TITLE
,
ATTR_TITLE_DEFAULT
,
PLATFORM_SCHEMA
,
BaseNotificationService
)
from
homeassistant.const
import
CONF_PASSWORD
REQUIREMENTS
=
[
'
simplepush==1.1.4
'
]
_LOGGER
=
logging
.
getLogger
(
__name__
)
ATTR_ENCRYPTED
=
'
encrypted
'
CONF_DEVICE_KEY
=
'
device_key
'
CONF_EVENT
=
'
event
'
CONF_SALT
=
'
salt
'
PLATFORM_SCHEMA
=
PLATFORM_SCHEMA
.
extend
({
vol
.
Required
(
CONF_DEVICE_KEY
):
cv
.
string
,
vol
.
Optional
(
CONF_EVENT
):
cv
.
string
,
vol
.
Inclusive
(
CONF_PASSWORD
,
ATTR_ENCRYPTED
):
cv
.
string
,
vol
.
Inclusive
(
CONF_SALT
,
ATTR_ENCRYPTED
):
cv
.
string
,
})
def
get_service
(
hass
,
config
,
discovery_info
=
None
):
"""
Get the Simplepush notification service.
"""
return
SimplePushNotificationService
(
config
)
class
SimplePushNotificationService
(
BaseNotificationService
):
"""
Implementation of the notification service for Simplepush.
"""
def
__init__
(
self
,
config
):
"""
Initialize the Simplepush notification service.
"""
self
.
_device_key
=
config
.
get
(
CONF_DEVICE_KEY
)
self
.
_event
=
config
.
get
(
CONF_EVENT
)
self
.
_password
=
config
.
get
(
CONF_PASSWORD
)
self
.
_salt
=
config
.
get
(
CONF_SALT
)
def
send_message
(
self
,
message
=
''
,
**
kwargs
):
"""
Send a message to a Simplepush user.
"""
from
simplepush
import
send
,
send_encrypted
title
=
kwargs
.
get
(
ATTR_TITLE
,
ATTR_TITLE_DEFAULT
)
if
self
.
_password
:
send_encrypted
(
self
.
_device_key
,
self
.
_password
,
self
.
_salt
,
title
,
message
,
event
=
self
.
_event
)
else
:
send
(
self
.
_device_key
,
title
,
message
,
event
=
self
.
_event
)
This diff is collapsed.
Click to expand it.
requirements_all.txt
+
0
−
3
View file @
612a37b2
...
...
@@ -1180,9 +1180,6 @@ sharp_aquos_rc==0.3.2
# homeassistant.components.sensor.shodan
shodan==1.7.7
# homeassistant.components.notify.simplepush
simplepush==1.1.4
# homeassistant.components.alarm_control_panel.simplisafe
simplisafe-python==1.0.5
...
...
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