mirror of
https://github.com/koush/scrypted.git
synced 2026-03-02 17:22:09 +00:00
17 lines
387 B
Python
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()
|