-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import esphome.codegen as cg | ||
import esphome.config_validation as cv | ||
from esphome.components import switch | ||
from esphome.const import CONF_ID | ||
|
||
from .. import balboa_ns, CONF_BALBOA_ID, BalboaGL | ||
|
||
DEPENDENCIES = ["BalboaGL"] | ||
|
||
LightSwitch = cg.esphome_ns.class_('LightSwitch', switch.Switch, cg.Component) | ||
|
||
CONFIG_SCHEMA = ( | ||
switch.switch_schema(LightSwitch) | ||
.extend( | ||
{ | ||
cv.GenerateID(CONF_BALBOA_ID): cv.use_id(BalboaGL), | ||
} | ||
) | ||
.extend(cv.COMPONENT_SCHEMA) | ||
) | ||
|
||
async def to_code(config): | ||
var = await switch.new_switch(config) | ||
await cg.register_component(var, config) | ||
|
||
paren = await cg.get_variable(config[CONF_BALBOA_ID]) | ||
# cg.add(var.set_balboa_parent(paren)) | ||
# cg.add(cg.RawExpression("balboaglclimate->set_spa(balboagl->get_spa())")) | ||
|
This file was deleted.
Oops, something went wrong.