1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 16:52:18 +01:00

Rename ref in codegen

This commit is contained in:
Daniel Vikström
2025-04-22 14:03:07 +02:00
parent f76ecb6604
commit 31f2376f15

View File

@@ -112,8 +112,8 @@ async def setup_entity(var, config):
if CONF_ENTITY_CATEGORY in config:
add(var.set_entity_category(config[CONF_ENTITY_CATEGORY]))
if CONF_DEVICE_ID in config:
parent = await get_variable(config[CONF_DEVICE_ID])
add(var.set_device_id(parent.get_id()))
device = await get_variable(config[CONF_DEVICE_ID])
add(var.set_device_id(device.get_id()))
def extract_registry_entry_config(