Use core constants for joaoapps_join (#46291)
This commit is contained in:
parent
22389043eb
commit
6e1f3b7861
2 changed files with 2 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue