From 9e8a8012dfcfca34d80d475324a91fffe17127d6 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Fri, 8 Sep 2023 01:15:58 +0200 Subject: [PATCH] Use shorthand attributes in Syncthru (#99884) --- homeassistant/components/syncthru/sensor.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/syncthru/sensor.py b/homeassistant/components/syncthru/sensor.py index c2ad159fb21..f651556bddb 100644 --- a/homeassistant/components/syncthru/sensor.py +++ b/homeassistant/components/syncthru/sensor.py @@ -109,6 +109,8 @@ class SyncThruMainSensor(SyncThruSensor): the displayed current status message. """ + _attr_entity_registry_enabled_default = False + def __init__(self, coordinator: DataUpdateCoordinator[SyncThru], name: str) -> None: """Initialize the sensor.""" super().__init__(coordinator, name) @@ -126,11 +128,6 @@ class SyncThruMainSensor(SyncThruSensor): "display_text": self.syncthru.device_status_details(), } - @property - def entity_registry_enabled_default(self) -> bool: - """Disable entity by default.""" - return False - class SyncThruTonerSensor(SyncThruSensor): """Implementation of a Samsung Printer toner sensor platform."""