mirror of
https://github.com/fmtr/haco.git
synced 2026-10-26 19:01:51 -04:00
Add restart button to demo config
This commit is contained in:
parent
d3242fd546
commit
eabc1d96c3
1 changed files with 10 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue