mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-14 19:18:11 +01:00
13 lines
430 B
Python
13 lines
430 B
Python
|
from cbpi.api import parameters, Property
|
||
|
from . import GenericMqttActor
|
||
|
|
||
|
@parameters([
|
||
|
Property.Text(label="Topic", configurable=True, description = "MQTT Topic"),
|
||
|
])
|
||
|
class TasmotaMqttActor(GenericMqttActor):
|
||
|
def __init__(self, cbpi, id, props):
|
||
|
GenericMqttActor.__init__(self, cbpi, id, props)
|
||
|
|
||
|
async def on_start(self):
|
||
|
await GenericMqttActor.on_start(self)
|
||
|
self.payload = "{switch_onoff}"
|