mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-19 04:33:27 +02:00
71ea2cec1f
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
21 lines
433 B
Python
21 lines
433 B
Python
from ..defines import CONF_INDICATOR, CONF_KNOB, CONF_MAIN
|
|
from ..types import LvBoolean
|
|
from . import WidgetType
|
|
|
|
CONF_SWITCH = "switch"
|
|
|
|
|
|
class SwitchType(WidgetType):
|
|
def __init__(self):
|
|
super().__init__(
|
|
CONF_SWITCH,
|
|
LvBoolean("lv_switch_t"),
|
|
(CONF_MAIN, CONF_INDICATOR, CONF_KNOB),
|
|
)
|
|
|
|
async def to_code(self, w, config):
|
|
return []
|
|
|
|
|
|
switch_spec = SwitchType()
|