mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Use shorthand attributes in NZBGet (#99622)
This commit is contained in:
parent
0ae12ad08f
commit
58af0ab0cd
@ -47,7 +47,7 @@ class NZBGetDownloadSwitch(NZBGetEntity, SwitchEntity):
|
|||||||
entry_name: str,
|
entry_name: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize a new NZBGet switch."""
|
"""Initialize a new NZBGet switch."""
|
||||||
self._unique_id = f"{entry_id}_download"
|
self._attr_unique_id = f"{entry_id}_download"
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
coordinator=coordinator,
|
coordinator=coordinator,
|
||||||
@ -55,11 +55,6 @@ class NZBGetDownloadSwitch(NZBGetEntity, SwitchEntity):
|
|||||||
entry_name=entry_name,
|
entry_name=entry_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
|
||||||
def unique_id(self) -> str:
|
|
||||||
"""Return the unique ID of the switch."""
|
|
||||||
return self._unique_id
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
"""Return the state of the switch."""
|
"""Return the state of the switch."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user