diff --git a/components/BalboaGL/climate/__init__.py b/components/BalboaGL/climate/__init__.py index 81125aa..0e1e499 100644 --- a/components/BalboaGL/climate/__init__.py +++ b/components/BalboaGL/climate/__init__.py @@ -75,5 +75,4 @@ async def to_code(config): await climate.register_climate(var, config) paren = await cg.get_variable(config[CONF_BALBOA_ID]) - spa = cg.add_global(cg.RawExpression("balboaGL* spa")) - cg.add(cg.RawExpression("balboaglclimate->set_spa(balboagl->get_spa())")) \ No newline at end of file + cg.add(cg.RawStatement(f"{var}->set_spa({paren}->get_spa());")) \ No newline at end of file diff --git a/components/BalboaGL/select/__init__.py b/components/BalboaGL/select/__init__.py index fe9d293..c8e5c36 100644 --- a/components/BalboaGL/select/__init__.py +++ b/components/BalboaGL/select/__init__.py @@ -45,14 +45,3 @@ async def setup_conf(config, key): async def to_code(config): await setup_conf(config, CONF_PUMP1) await setup_conf(config, CONF_PUMP2) - # cg.add(cg.RawExpression("balboaglclimate->set_spa(balboagl->get_spa())")) - -# async def to_code(config): -# options_map = config[CONF_OPTIONS] -# var = await select.new_select(config, options=list(options_map.values())) -# await cg.register_component(var, config) -# cg.add(var.set_select_mappings(list(options_map.keys()))) -# parent = await cg.get_variable(config[CONF_TUYA_ID]) -# cg.add(var.set_tuya_parent(parent)) -# cg.add(var.set_select_id(config[CONF_ENUM_DATAPOINT])) -# cg.add(var.set_optimistic(config[CONF_OPTIMISTIC])) diff --git a/components/BalboaGL/switch/__init__.py b/components/BalboaGL/switch/__init__.py index 6edf985..47f0ec1 100644 --- a/components/BalboaGL/switch/__init__.py +++ b/components/BalboaGL/switch/__init__.py @@ -21,6 +21,4 @@ async def to_code(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("balboagllightswitch->set_spa(balboagl->get_spa())")) - + cg.add(cg.RawStatement(f"{var}->set_spa({paren}->get_spa());"))