From 96128340a054f22b6071c7e2180424732156def7 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Fri, 3 Feb 2023 20:04:51 +0100 Subject: [PATCH] Fix code format issue in Yale Smart Alarm (#87323) fixes undefined --- homeassistant/components/yale_smart_alarm/lock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/yale_smart_alarm/lock.py b/homeassistant/components/yale_smart_alarm/lock.py index 807ecdecada..fde08d08fbd 100644 --- a/homeassistant/components/yale_smart_alarm/lock.py +++ b/homeassistant/components/yale_smart_alarm/lock.py @@ -45,7 +45,7 @@ class YaleDoorlock(YaleEntity, LockEntity): ) -> None: """Initialize the Yale Lock Device.""" super().__init__(coordinator, data) - self._attr_code_format = f"^\\d{code_format}$" + self._attr_code_format = rf"^\d{{{code_format}}}$" self.lock_name: str = data["name"] async def async_unlock(self, **kwargs: Any) -> None: