Add restart button to demo config

This commit is contained in:
Edward Brown 2023-08-31 15:20:33 +01:00
parent d3242fd546
commit eabc1d96c3

View file

@ -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)