From 58af0ab0cda751046d647b32e9166d5254405f1d Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 5 Sep 2023 15:37:00 +0200 Subject: [PATCH] Use shorthand attributes in NZBGet (#99622) --- homeassistant/components/nzbget/switch.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/homeassistant/components/nzbget/switch.py b/homeassistant/components/nzbget/switch.py index e6a2b213873..5d72cae37cf 100644 --- a/homeassistant/components/nzbget/switch.py +++ b/homeassistant/components/nzbget/switch.py @@ -47,7 +47,7 @@ class NZBGetDownloadSwitch(NZBGetEntity, SwitchEntity): entry_name: str, ) -> None: """Initialize a new NZBGet switch.""" - self._unique_id = f"{entry_id}_download" + self._attr_unique_id = f"{entry_id}_download" super().__init__( coordinator=coordinator, @@ -55,11 +55,6 @@ class NZBGetDownloadSwitch(NZBGetEntity, SwitchEntity): entry_name=entry_name, ) - @property - def unique_id(self) -> str: - """Return the unique ID of the switch.""" - return self._unique_id - @property def is_on(self): """Return the state of the switch."""