craftbeerpi4-pione/cbpi/extension/mqtt_actor/__init__.py

18 lines
633 B
Python
Raw Normal View History

2021-11-22 16:09:09 +01:00
# -*- coding: utf-8 -*-
from cbpi.api import *
from .mqtt_actor import MQTTActor
from .generic_mqtt_actor import GenericMqttActor
from .tasmota_mqtt_actor import TasmotaMqttActor
2021-11-22 16:09:09 +01:00
def setup(cbpi):
'''
This method is called by the server during startup
Here you need to register your plugins at the server
:param cbpi: the cbpi core
:return:
'''
if str(cbpi.static_config.get("mqtt", False)).lower() == "true":
2021-11-22 16:09:09 +01:00
cbpi.plugin.register("MQTTActor", MQTTActor)
cbpi.plugin.register("MQTT Actor (Generic)", GenericMqttActor)
cbpi.plugin.register("MQTT Actor (Tasmota)", TasmotaMqttActor)