diff --git a/haco/configs/demo.py b/haco/configs/demo.py index 0e68df9..ebe6e4f 100644 --- a/haco/configs/demo.py +++ b/haco/configs/demo.py @@ -1,3 +1,13 @@ +from haco import Button, Tasmota + +restart = Button('Restart Tasmota', icon='restart') + + +@restart.callback() +def ha(value) -> Tasmota[str, 'tasmota.cmd("restart 1")']: + return value + + from haco import Sensor memory = Sensor('Memory Free', icon='memory', uom=Sensor.UOM.DATA_KILOBYTES, device_class=Sensor.DEVICE_CLASS.DATA_SIZE)