Fix cover config with no ID (#317)

* Fix cover config with no ID
This commit is contained in:
Tomer 2024-11-10 18:01:05 +02:00 committed by GitHub
parent 76f8b68077
commit 769706d0ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(' ', '_')}",
)
)