mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Use shorthand attributes in Syncthru (#99884)
This commit is contained in:
parent
a3d6c6192e
commit
9e8a8012df
@ -109,6 +109,8 @@ class SyncThruMainSensor(SyncThruSensor):
|
|||||||
the displayed current status message.
|
the displayed current status message.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
_attr_entity_registry_enabled_default = False
|
||||||
|
|
||||||
def __init__(self, coordinator: DataUpdateCoordinator[SyncThru], name: str) -> None:
|
def __init__(self, coordinator: DataUpdateCoordinator[SyncThru], name: str) -> None:
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
super().__init__(coordinator, name)
|
super().__init__(coordinator, name)
|
||||||
@ -126,11 +128,6 @@ class SyncThruMainSensor(SyncThruSensor):
|
|||||||
"display_text": self.syncthru.device_status_details(),
|
"display_text": self.syncthru.device_status_details(),
|
||||||
}
|
}
|
||||||
|
|
||||||
@property
|
|
||||||
def entity_registry_enabled_default(self) -> bool:
|
|
||||||
"""Disable entity by default."""
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
class SyncThruTonerSensor(SyncThruSensor):
|
class SyncThruTonerSensor(SyncThruSensor):
|
||||||
"""Implementation of a Samsung Printer toner sensor platform."""
|
"""Implementation of a Samsung Printer toner sensor platform."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user