Skip to content

Commit ab1e730

Browse files
committed
fix ads extra
1 parent d85605c commit ab1e730

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

custom_components/linkytic/sensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,7 @@ def update(self):
13741374
# Handle entity availability
13751375
if value is None:
13761376
if self._attr_available:
1377+
self._extra = {}
13771378
if not self._serial_controller.is_connected():
13781379
_LOGGER.debug(
13791380
"%s: marking the %s sensor as unavailable: serial connection lost",

custom_components/linkytic/serial_reader.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ def parse_ads(self, ads):
379379
len(ads),
380380
ads,
381381
)
382-
self._extra = {}
383382
return
384383
# let's parse ADS as EURIDIS
385384
device_identification = {DID_YEAR: ads[2:4], DID_REGNUMBER: ads[6:]}
@@ -408,7 +407,7 @@ def parse_ads(self, ads):
408407
# # Update device infos
409408
self.device_identification = device_identification
410409
# Parsing done
411-
_LOGGER.debug("%s: parsed ADS: %s", self._title, repr(self._extra))
410+
_LOGGER.debug("%s: parsed ADS: %s", self._title, repr(self.device_identification))
412411

413412

414413
class InvalidChecksum(Exception):

0 commit comments

Comments
 (0)