mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
[tuya_select] - Fix datapoint config error. (#8871)
This commit is contained in:
parent
da4e710249
commit
a5f85b4437
@ -54,8 +54,8 @@ async def to_code(config):
|
|||||||
cg.add(var.set_select_mappings(list(options_map.keys())))
|
cg.add(var.set_select_mappings(list(options_map.keys())))
|
||||||
parent = await cg.get_variable(config[CONF_TUYA_ID])
|
parent = await cg.get_variable(config[CONF_TUYA_ID])
|
||||||
cg.add(var.set_tuya_parent(parent))
|
cg.add(var.set_tuya_parent(parent))
|
||||||
if enum_datapoint := config.get(CONF_ENUM_DATAPOINT, None) is not None:
|
if (enum_datapoint := config.get(CONF_ENUM_DATAPOINT, None)) is not None:
|
||||||
cg.add(var.set_select_id(enum_datapoint, False))
|
cg.add(var.set_select_id(enum_datapoint, False))
|
||||||
if int_datapoint := config.get(CONF_INT_DATAPOINT, None) is not None:
|
if (int_datapoint := config.get(CONF_INT_DATAPOINT, None)) is not None:
|
||||||
cg.add(var.set_select_id(int_datapoint, True))
|
cg.add(var.set_select_id(int_datapoint, True))
|
||||||
cg.add(var.set_optimistic(config[CONF_OPTIMISTIC]))
|
cg.add(var.set_optimistic(config[CONF_OPTIMISTIC]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user