From 5d4adec0eeb1e097793c57cc46ae5e5781bb00a1 Mon Sep 17 00:00:00 2001 From: Tomer <57483589+tomer-w@users.noreply.github.com> Date: Sun, 10 Nov 2024 08:04:50 +0200 Subject: [PATCH] Fix cover config with no ID --- custom_components/rpi_gpio/cover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/rpi_gpio/cover.py b/custom_components/rpi_gpio/cover.py index d3d32c5..e040693 100644 --- a/custom_components/rpi_gpio/cover.py +++ b/custom_components/rpi_gpio/cover.py @@ -82,7 +82,7 @@ async def async_setup_platform( cover.get(CONF_STATE_PIN), state_pull_mode, invert_state, - cover.get(CONF_UNIQUE_ID) or f"{DOMAIN}_{cover.get(CONF_RELAY_PORT) or cover.get("relay_pin")}_{cover[CONF_NAME].lower().replace(' ', '_')}", + cover.get(CONF_UNIQUE_ID) or f"{DOMAIN}_{cover.get(CONF_RELAY_PIN)}_{cover[CONF_NAME].lower().replace(' ', '_')}", ) )