From a64940cf42ef877858c1ea0f5e9c6d14223c040e Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 26 Jun 2023 18:25:39 +0200 Subject: [PATCH] Use shorthand attribute for EAFM (#95233) --- homeassistant/components/eafm/sensor.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/homeassistant/components/eafm/sensor.py b/homeassistant/components/eafm/sensor.py index 2650aa35489..ce3ee2bfbec 100644 --- a/homeassistant/components/eafm/sensor.py +++ b/homeassistant/components/eafm/sensor.py @@ -100,6 +100,7 @@ class Measurement(CoordinatorEntity, SensorEntity): """Initialise the gauge with a data instance and station.""" super().__init__(coordinator) self.key = key + self._attr_unique_id = key @property def station_name(self): @@ -126,11 +127,6 @@ class Measurement(CoordinatorEntity, SensorEntity): """Return the name of the gauge.""" return f"{self.station_name} {self.parameter_name} {self.qualifier}" - @property - def unique_id(self): - """Return the unique id of the gauge.""" - return self.key - @property def device_info(self): """Return the device info."""