Skip to content

Commit

Permalink
Great migration notify (#22406)
Browse files Browse the repository at this point in the history
* Move notify platforms into components

* Move notify tests

* Fix notify tests

* More fixes

* Update requirements

* Update .coveragerc

* Run gen reqs
  • Loading branch information
robbiet480 authored and balloob committed Mar 28, 2019
1 parent 92457ca commit 7741ec4
Show file tree
Hide file tree
Showing 105 changed files with 635 additions and 564 deletions.
879 changes: 438 additions & 441 deletions .coveragerc

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions homeassistant/components/apns/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The apns component."""
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import track_state_change

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TARGET, DOMAIN, PLATFORM_SCHEMA, BaseNotificationService)

REQUIREMENTS = ['apns2==0.3.0']
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/aws_lambda/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The aws_lambda component."""
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.json import JSONEncoder

from . import ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_TARGET, PLATFORM_SCHEMA,
BaseNotificationService)

REQUIREMENTS = ['boto3==1.9.16']

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/aws_sns/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The aws_sns component."""
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from homeassistant.const import CONF_NAME, CONF_PLATFORM
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_TARGET, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/aws_sqs/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The aws_sqs component."""
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from homeassistant.const import CONF_NAME, CONF_PLATFORM
import homeassistant.helpers.config_validation as cv

from . import ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_TARGET, PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ["boto3==1.9.16"]
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/ciscospark/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The ciscospark component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from homeassistant.const import CONF_TOKEN
import homeassistant.helpers.config_validation as cv

from . import ATTR_TITLE, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_TITLE, PLATFORM_SCHEMA,
BaseNotificationService)

REQUIREMENTS = ['ciscosparkapi==0.4.2']

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/clickatell/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The clickatell component."""
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from homeassistant.const import CONF_API_KEY, CONF_RECIPIENT
import homeassistant.helpers.config_validation as cv

from . import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/clicksend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The clicksend component."""
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
CONTENT_TYPE_JSON)
import homeassistant.helpers.config_validation as cv

from . import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/clicksend_tts/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The clicksend_tts component."""
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
CONF_API_KEY, CONF_RECIPIENT, CONF_USERNAME, CONTENT_TYPE_JSON)
import homeassistant.helpers.config_validation as cv

from . import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from homeassistant.const import CONF_COMMAND, CONF_NAME
import homeassistant.helpers.config_validation as cv

from . import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/demo/
"""
from . import BaseNotificationService
from homeassistant.components.notify import BaseNotificationService

EVENT_NOTIFY = "notify"

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/discord/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The discord component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
from homeassistant.const import CONF_TOKEN
import homeassistant.helpers.config_validation as cv

from . import ATTR_DATA, ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_DATA, ATTR_TARGET,
PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/facebook/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The facebook component."""
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
from homeassistant.const import CONTENT_TYPE_JSON
import homeassistant.helpers.config_validation as cv

from . import ATTR_DATA, ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_DATA, ATTR_TARGET,
PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util

from . import (
from homeassistant.components.notify import (
ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, BaseNotificationService)

CONF_TIMESTAMP = 'timestamp'
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/flock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The flock component."""
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv

from . import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)
_RESOURCE = 'https://api.flock.com/hooks/sendMessage/'
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/free_mobile/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The free_mobile component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_USERNAME
import homeassistant.helpers.config_validation as cv

from . import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (PLATFORM_SCHEMA,
BaseNotificationService)

REQUIREMENTS = ['freesms==0.1.2']

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/gntp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The gntp component."""
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from homeassistant.const import CONF_PASSWORD, CONF_PORT
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, BaseNotificationService)

REQUIREMENTS = ['gntp==1.0.3']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from homeassistant.const import ATTR_SERVICE
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_MESSAGE, DOMAIN, PLATFORM_SCHEMA, BaseNotificationService)

_LOGGER = logging.getLogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/hipchat/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The hipchat component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
from homeassistant.const import CONF_HOST, CONF_ROOM, CONF_TOKEN
import homeassistant.helpers.config_validation as cv

from . import ATTR_DATA, ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_DATA, ATTR_TARGET,
PLATFORM_SCHEMA,
BaseNotificationService)

REQUIREMENTS = ['hipnotify==1.0.8']

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/html5/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The html5 component."""
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from homeassistant.util import ensure_unique_string
from homeassistant.util.json import load_json, save_json

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TARGET, ATTR_TITLE, ATTR_TITLE_DEFAULT, DOMAIN,
PLATFORM_SCHEMA, BaseNotificationService)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/lannouncer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The lannouncer component."""
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
from homeassistant.const import CONF_HOST, CONF_PORT
import homeassistant.helpers.config_validation as cv

from . import ATTR_DATA, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_DATA, PLATFORM_SCHEMA,
BaseNotificationService)

ATTR_METHOD = 'method'
ATTR_METHOD_DEFAULT = 'speak'
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/llamalab_automate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The llamalab_automate component."""
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from homeassistant.const import CONF_API_KEY, CONF_DEVICE
from homeassistant.helpers import config_validation as cv

from . import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (PLATFORM_SCHEMA,
BaseNotificationService)

_LOGGER = logging.getLogger(__name__)
_RESOURCE = 'https://llamalab.com/automate/cloud/message'
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/mastodon/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The mastodon component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from homeassistant.const import CONF_ACCESS_TOKEN
import homeassistant.helpers.config_validation as cv

from . import PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (PLATFORM_SCHEMA,
BaseNotificationService)

REQUIREMENTS = ['Mastodon.py==1.3.1']

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/message_bird/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The message_bird component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
from homeassistant.const import CONF_API_KEY, CONF_SENDER
import homeassistant.helpers.config_validation as cv

from . import ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_TARGET, PLATFORM_SCHEMA,
BaseNotificationService)

REQUIREMENTS = ['messagebird==1.2.0']

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""
import logging

from . import BaseNotificationService
from homeassistant.components.notify import BaseNotificationService

DEPENDENCIES = ['mycroft']

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/nfandroidtv/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The nfandroidtv component."""
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from homeassistant.const import CONF_TIMEOUT, CONF_HOST
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/prowl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The prowl component."""
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from homeassistant.const import CONF_API_KEY
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TARGET, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/pushetta/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The pushetta component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from homeassistant.const import CONF_API_KEY
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, BaseNotificationService)

_LOGGER = logging.getLogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/pushover/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The pushover component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from homeassistant.const import CONF_API_KEY
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TARGET, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/pushsafer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The pushsafer component."""
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TARGET, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
HTTP_DIGEST_AUTHENTICATION)
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_TARGET, ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/rocketchat/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The rocketchat component."""
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
CONF_PASSWORD, CONF_ROOM, CONF_URL, CONF_USERNAME)
import homeassistant.helpers.config_validation as cv

from . import ATTR_DATA, PLATFORM_SCHEMA, BaseNotificationService
from homeassistant.components.notify import (ATTR_DATA, PLATFORM_SCHEMA,
BaseNotificationService)

REQUIREMENTS = ['rocketchat-API==0.6.1']

Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/sendgrid/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The sendgrid component."""
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
CONF_API_KEY, CONF_RECIPIENT, CONF_SENDER, CONTENT_TYPE_TEXT_PLAIN)
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, BaseNotificationService)

REQUIREMENTS = ['sendgrid==5.6.0']
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/simplepush/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The simplepush component."""
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from homeassistant.const import CONF_PASSWORD
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, BaseNotificationService)

REQUIREMENTS = ['simplepush==1.1.4']
Expand Down
1 change: 1 addition & 0 deletions homeassistant/components/slack/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""The slack component."""
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from homeassistant.const import CONF_API_KEY, CONF_ICON, CONF_USERNAME
import homeassistant.helpers.config_validation as cv

from . import (
from homeassistant.components.notify import (
ATTR_DATA, ATTR_TARGET, ATTR_TITLE, PLATFORM_SCHEMA,
BaseNotificationService)

Expand Down
Loading

0 comments on commit 7741ec4

Please sign in to comment.