From 6e1f3b78617553e3848536b1a0b4d3c375e01572 Mon Sep 17 00:00:00 2001 From: tkdrob Date: Wed, 10 Feb 2021 08:35:11 -0500 Subject: [PATCH] Use core constants for joaoapps_join (#46291) --- homeassistant/components/joaoapps_join/__init__.py | 4 +--- homeassistant/components/joaoapps_join/notify.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/joaoapps_join/__init__.py b/homeassistant/components/joaoapps_join/__init__.py index 1bc4ae298c4..a65a7ffd7fe 100644 --- a/homeassistant/components/joaoapps_join/__init__.py +++ b/homeassistant/components/joaoapps_join/__init__.py @@ -12,14 +12,13 @@ from pyjoin import ( ) import voluptuous as vol -from homeassistant.const import CONF_API_KEY, CONF_NAME +from homeassistant.const import CONF_API_KEY, CONF_DEVICE_ID, CONF_NAME import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) DOMAIN = "joaoapps_join" -CONF_DEVICE_ID = "device_id" CONF_DEVICE_IDS = "device_ids" CONF_DEVICE_NAMES = "device_names" @@ -115,7 +114,6 @@ def register_device(hass, api_key, name, device_id, device_ids, device_names): def setup(hass, config): """Set up the Join services.""" - for device in config[DOMAIN]: api_key = device.get(CONF_API_KEY) device_id = device.get(CONF_DEVICE_ID) diff --git a/homeassistant/components/joaoapps_join/notify.py b/homeassistant/components/joaoapps_join/notify.py index d01e49c77d8..7ba089e5dab 100644 --- a/homeassistant/components/joaoapps_join/notify.py +++ b/homeassistant/components/joaoapps_join/notify.py @@ -11,12 +11,11 @@ from homeassistant.components.notify import ( PLATFORM_SCHEMA, BaseNotificationService, ) -from homeassistant.const import CONF_API_KEY +from homeassistant.const import CONF_API_KEY, CONF_DEVICE_ID import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) -CONF_DEVICE_ID = "device_id" CONF_DEVICE_IDS = "device_ids" CONF_DEVICE_NAMES = "device_names" @@ -61,7 +60,6 @@ class JoinNotificationService(BaseNotificationService): def send_message(self, message="", **kwargs): """Send a message to a user.""" - title = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT) data = kwargs.get(ATTR_DATA) or {} send_notification(