Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions homeassistant/components/html5/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Constants for the HTML5 component."""
DOMAIN = "html5"
SERVICE_DISMISS = "dismiss"
5 changes: 2 additions & 3 deletions homeassistant/components/html5/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@
ATTR_TARGET,
ATTR_TITLE,
ATTR_TITLE_DEFAULT,
DOMAIN,
PLATFORM_SCHEMA,
BaseNotificationService,
)

from .const import DOMAIN, SERVICE_DISMISS

_LOGGER = logging.getLogger(__name__)

REGISTRATIONS_FILE = "html5_push_registrations.conf"

SERVICE_DISMISS = "html5_dismiss"

ATTR_GCM_SENDER_ID = "gcm_sender_id"
ATTR_GCM_API_KEY = "gcm_api_key"
ATTR_VAPID_PUB_KEY = "vapid_pub_key"
Expand Down
9 changes: 9 additions & 0 deletions homeassistant/components/html5/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dismiss:
description: Dismiss a html5 notification.
fields:
target:
description: An array of targets. Optional.
example: ['my_phone', 'my_tablet']
data:
description: Extended information of notification. Supports tag. Optional.
example: '{ "tag": "tagname" }'
10 changes: 0 additions & 10 deletions homeassistant/components/notify/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ notify:
description: Extended information for notification. Optional depending on the platform.
example: platform specific

html5_dismiss:
description: Dismiss a html5 notification.
fields:
target:
description: An array of targets. Optional.
example: ['my_phone', 'my_tablet']
data:
description: Extended information of notification. Supports tag. Optional.
example: '{ "tag": "tagname" }'

apns_register:
description: Registers a device to receive push notifications.
fields:
Expand Down