Move imports for pushbullet component (#27460)

* Move imports in dht component

* remove empty line

* Move imports for pushbullet component

* revert unwanted changes

* Move imports for pushbullet component

* remove dht change from that branch

* remove dht changes from this branch
This commit is contained in:
Sébastien RAMAGE authored and Paulus Schoutsen committed 2019-10-12 13:05:36 -07:00
1 parent 86da3fb334
commit 6b92dbe209
2 files changed
+7 -7

No files matched your search

@@ -2,6 +2,9 @@
import logging
import mimetypes
from pushbullet import PushBullet
from pushbullet import InvalidKeyError
from pushbullet import PushError
import voluptuous as vol
from homeassistant.const import CONF_API_KEY
@@ -28,8 +31,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({vol.Required(CONF_API_KEY): cv.string}
def get_service(hass, config, discovery_info=None):
"""Get the Pushbullet notification service."""
from pushbullet import PushBullet
from pushbullet import InvalidKeyError
try:
pushbullet = PushBullet(config[CONF_API_KEY])
@@ -124,7 +125,6 @@ class PushBulletNotificationService(BaseNotificationService):
def _push_data(self, message, title, data, pusher, email=None):
"""Create the message content."""
from pushbullet import PushError
if data is None:
data = {}