Files
scrypted/plugins/vscode-python/src/main.py
2021-11-13 16:15:19 -08:00

17 lines
387 B
Python

from __future__ import annotations
import scrypted_sdk
from scrypted_sdk.types import OnOff
class PythonLight(scrypted_sdk.ScryptedDeviceBase, OnOff):
async def turnOff(self) -> None:
print("turned off!")
self.on = False
async def turnOn(self) -> None:
print("turned on!")
self.on = True
def create_scrypted_plugin():
return PythonLight()