Example #1
0
 def make_push_notitication(self, name, url, content):
     """Create notification config."""
     from wirelesstagpy import NotificationConfig
     return NotificationConfig(
         name, {
             'url': url,
             'verb': 'POST',
             'content': content,
             'disabled': False,
             'nat': True
         })
Example #2
0
    def make_notifications(self, binary_sensors, mac):
        """Create configurations for push notifications."""
        _LOGGER.info("Creating configurations for push notifications")
        configs = []

        bi_url = self.binary_event_callback_url
        for bi_sensor in binary_sensors:
            configs.extend(bi_sensor.event.build_notifications(bi_url, mac))

        update_url = self.update_callback_url

        update_config = NC.make_config_for_update_event(update_url, mac)

        configs.append(update_config)
        return configs
    def make_notifications(self, binary_sensors, mac):
        """Create configurations for push notifications."""
        _LOGGER.info("Creating configurations for push notifications.")
        configs = []

        bi_url = self.binary_event_callback_url
        for bi_sensor in binary_sensors:
            configs.extend(bi_sensor.event.build_notifications(bi_url, mac))

        update_url = self.update_callback_url
        from wirelesstagpy import NotificationConfig as NC
        update_config = NC.make_config_for_update_event(update_url, mac)

        configs.append(update_config)
        return configs