From 030c87d14256acd9c57aa131a750bcdc87a47bd1 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Sat, 15 May 2021 17:02:52 +1200 Subject: [PATCH 1/2] Allow RC522 components to have multiple configurations (#1782) --- esphome/components/rc522/__init__.py | 1 - esphome/components/rc522_i2c/__init__.py | 2 +- esphome/components/rc522_spi/__init__.py | 1 + tests/test1.yaml | 13 +++++++++---- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/esphome/components/rc522/__init__.py b/esphome/components/rc522/__init__.py index 970b867e79..7858213f06 100644 --- a/esphome/components/rc522/__init__.py +++ b/esphome/components/rc522/__init__.py @@ -7,7 +7,6 @@ from esphome.core import coroutine CODEOWNERS = ["@glmnet"] AUTO_LOAD = ["binary_sensor"] -MULTI_CONF = True CONF_RC522_ID = "rc522_id" diff --git a/esphome/components/rc522_i2c/__init__.py b/esphome/components/rc522_i2c/__init__.py index 532adfce79..081536b6b1 100644 --- a/esphome/components/rc522_i2c/__init__.py +++ b/esphome/components/rc522_i2c/__init__.py @@ -6,7 +6,7 @@ from esphome.const import CONF_ID CODEOWNERS = ["@glmnet"] DEPENDENCIES = ["i2c"] AUTO_LOAD = ["rc522"] - +MULTI_CONF = True rc522_i2c_ns = cg.esphome_ns.namespace("rc522_i2c") RC522I2C = rc522_i2c_ns.class_("RC522I2C", rc522.RC522, i2c.I2CDevice) diff --git a/esphome/components/rc522_spi/__init__.py b/esphome/components/rc522_spi/__init__.py index 6ae163bcb4..2e5630f46d 100644 --- a/esphome/components/rc522_spi/__init__.py +++ b/esphome/components/rc522_spi/__init__.py @@ -6,6 +6,7 @@ from esphome.const import CONF_ID CODEOWNERS = ["@glmnet"] DEPENDENCIES = ["spi"] AUTO_LOAD = ["rc522"] +MULTI_CONF = True rc522_spi_ns = cg.esphome_ns.namespace("rc522_spi") RC522Spi = rc522_spi_ns.class_("RC522Spi", rc522.RC522, spi.SPIDevice) diff --git a/tests/test1.yaml b/tests/test1.yaml index 01431eb1fc..8fedf4eb20 100644 --- a/tests/test1.yaml +++ b/tests/test1.yaml @@ -1978,10 +1978,15 @@ rc522_spi: ESP_LOGD("main", "Found tag %s", x.c_str()); rc522_i2c: - update_interval: 1s - on_tag: - - lambda: |- - ESP_LOGD("main", "Found tag %s", x.c_str()); + - update_interval: 1s + on_tag: + - lambda: |- + ESP_LOGD("main", "Found tag %s", x.c_str()); + + - update_interval: 1s + on_tag: + - lambda: |- + ESP_LOGD("main", "Found tag %s", x.c_str()); gps: uart_id: uart0 From a59761d292707dca3779fb379caf58430f44e1b0 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Mon, 17 May 2021 13:53:35 +1200 Subject: [PATCH 2/2] Bump version to v1.18.0b4 --- esphome/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/const.py b/esphome/const.py index 0c18ff86de..fdecf0ecb7 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -2,7 +2,7 @@ MAJOR_VERSION = 1 MINOR_VERSION = 18 -PATCH_VERSION = "0b3" +PATCH_VERSION = "0b4" __short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__ = f"{__short_version__}.{PATCH_VERSION}"