async def METHOD_NAME(self):
    await self.AD.plugins.notify_plugin_started(
        self.name,
        self.namespace,
        self.get_metadata(),
        self.get_complete_state(),
        True,
    )
    while not self.stopping:
        if self.current_event >= len(self.config["sequence"]["events"]) and (
            "loop" in self.config["sequence"] and self.config["loop"] == 0 or "loop" not in self.config["sequence"]
        ):
            while not self.stopping:
                await asyncio.sleep(1)
            return None
        else:
            event = self.config["sequence"]["events"][self.current_event]
            await asyncio.sleep(event["offset"])
            if "state" in event:
                entity = event["state"]["entity"]
                old_state = self.state[entity]
                new_state = event["state"]["newstate"]
                self.state[entity] = new_state
                ret = {
                    "event_type": "state_changed",
                    "data": {"entity_id": entity, "new_state": new_state, "old_state": old_state},
                }
                self.logger.debug("*** State Update: %s ***", ret)
                await self.AD.state.process_event(self.namespace, copy.deepcopy(ret))
            elif "event" in event:
                ret = {
                    "event_type": event["event"]["event_type"],
                    "data": event["event"]["data"],
                }
                self.logger.debug("*** Event: %s ***", ret)
                await self.AD.state.process_event(self.namespace, copy.deepcopy(ret))
            elif "disconnect" in event:
                self.logger.debug("*** Disconnected ***")
                self.AD.plugins.notify_plugin_stopped(self.namespace)
            elif "connect" in event:
                self.logger.debug("*** Connected ***")
                await self.AD.plugins.notify_plugin_started(self.namespace)
            self.current_event += 1
            if (
                self.current_event >= len(self.config["sequence"]["events"])
                and "loop" in self.config["sequence"]
                and self.config["sequence"]["loop"] == 1
            ):
                self.current_event = 0