From 8a055675af8e428bf7b8338cd0b22d01c252c6dc Mon Sep 17 00:00:00 2001 From: lkomurcu <44089359+lkomurcu@users.noreply.github.com> Date: Sun, 19 Jun 2022 21:39:40 +0200 Subject: [PATCH] Move gas mbus config option being a define to being a build flag since its used in external libraries. (#3575) --- esphome/components/dsmr/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/dsmr/__init__.py b/esphome/components/dsmr/__init__.py index 7a7681082e..624a0f35a1 100644 --- a/esphome/components/dsmr/__init__.py +++ b/esphome/components/dsmr/__init__.py @@ -79,7 +79,7 @@ async def to_code(config): cg.add(var.set_request_interval(config[CONF_REQUEST_INTERVAL].total_milliseconds)) cg.add(var.set_receive_timeout(config[CONF_RECEIVE_TIMEOUT].total_milliseconds)) - cg.add_define("DSMR_GAS_MBUS_ID", config[CONF_GAS_MBUS_ID]) + cg.add_build_flag("-DDSMR_GAS_MBUS_ID=" + str(config[CONF_GAS_MBUS_ID])) # DSMR Parser cg.add_library("glmnet/Dsmr", "0.5")