mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-23 14:18:28 +02:00
71ea2cec1f
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
21 lines
423 B
Python
21 lines
423 B
Python
from esphome.const import CONF_BUTTON
|
|
|
|
from ..defines import CONF_MAIN
|
|
from ..types import LvBoolean, WidgetType
|
|
|
|
lv_button_t = LvBoolean("lv_btn_t")
|
|
|
|
|
|
class ButtonType(WidgetType):
|
|
def __init__(self):
|
|
super().__init__(CONF_BUTTON, lv_button_t, (CONF_MAIN,), lv_name="btn")
|
|
|
|
def get_uses(self):
|
|
return ("btn",)
|
|
|
|
async def to_code(self, w, config):
|
|
return []
|
|
|
|
|
|
button_spec = ButtonType()
|