Add missing hangouts data/image to notify service (#17576)
* add missing hangouts image_file/url to notify services Missed adding support for hangouts image to notify service * default in schema
This commit is contained in:
parent
61a96aecc0
commit
42a444712b
1 changed files with 6 additions and 4 deletions
|
@ -11,10 +11,10 @@ import voluptuous as vol
|
|||
from homeassistant.components.notify import (ATTR_TARGET, PLATFORM_SCHEMA,
|
||||
NOTIFY_SERVICE_SCHEMA,
|
||||
BaseNotificationService,
|
||||
ATTR_MESSAGE)
|
||||
ATTR_MESSAGE, ATTR_DATA)
|
||||
|
||||
from homeassistant.components.hangouts.const \
|
||||
import (DOMAIN, SERVICE_SEND_MESSAGE,
|
||||
import (DOMAIN, SERVICE_SEND_MESSAGE, MESSAGE_DATA_SCHEMA,
|
||||
TARGETS_SCHEMA, CONF_DEFAULT_CONVERSATIONS)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -26,7 +26,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||
})
|
||||
|
||||
NOTIFY_SERVICE_SCHEMA = NOTIFY_SERVICE_SCHEMA.extend({
|
||||
vol.Optional(ATTR_TARGET): [TARGETS_SCHEMA]
|
||||
vol.Optional(ATTR_TARGET): [TARGETS_SCHEMA],
|
||||
vol.Optional(ATTR_DATA, default={}): MESSAGE_DATA_SCHEMA
|
||||
})
|
||||
|
||||
|
||||
|
@ -59,7 +60,8 @@ class HangoutsNotificationService(BaseNotificationService):
|
|||
messages.append({'text': message, 'parse_str': True})
|
||||
service_data = {
|
||||
ATTR_TARGET: target_conversations,
|
||||
ATTR_MESSAGE: messages
|
||||
ATTR_MESSAGE: messages,
|
||||
ATTR_DATA: kwargs[ATTR_DATA]
|
||||
}
|
||||
|
||||
return self.hass.services.call(
|
||||
|
|
Loading…
Add table
Reference in a new issue