'Send a message to some LaMetric deviced.'

def send_message(self, message='', **kwargs):

    from lmnotify import SimpleFrame, Sound, Model
    targets = kwargs.get(ATTR_TARGET)
    data = kwargs.get(ATTR_DATA)
    _LOGGER.debug('Targets/Data:    %s/%s', targets, data)
    icon = self._icon
    sound = None
    if (data is not None):
        if ('icon' in data):
            icon = data['icon']
        if ('sound' in data):
            try:
                sound = Sound(category='notifications', sound_id=data['sound'])
                _LOGGER.debug('Adding    notification    sound    %s', data['sound'])
            except AssertionError:
                _LOGGER.error('Sound    ID    %s    unknown,    ignoring', data['sound'])
    text_frame = SimpleFrame(icon, message)
    _LOGGER.debug('Icon/Message/Duration:    %s,    %s,    %d', icon, message, self._display_time)
    frames = [text_frame]
    if (sound is not None):
        frames.append(sound)
    _LOGGER.debug(frames)
    model = Model(frames=frames)
    lmn = self.hasslametricmanager.manager()
    devices = lmn.get_devices()
    for dev in devices:
        if ((targets is None) or (dev['name'] in targets)):
            lmn.set_device(dev)
            lmn.send_notification(model, lifetime=self._display_time)
            _LOGGER.debug('Sent    notification    to    LaMetric    %s', dev['name'])
