Skip to content

Commit f55de1f

Browse files
authored
Fix last packet id
1 parent f4b8e58 commit f55de1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/ble_monitor/sensor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ def collect(self, data, period_cnt, batt_attr=None):
990990
return
991991
self._state = data[self.entity_description.key]
992992
self._extra_state_attributes["sensor_type"] = data["type"]
993-
self._extra_state_attributes["last_packet id"] = data["packet"]
993+
self._extra_state_attributes["last_packet_id"] = data["packet"]
994994
self._extra_state_attributes["firmware"] = data["firmware"]
995995
self._extra_state_attributes['mac_address' if self.is_beacon else 'uuid'] = dict_get_or_normalize(
996996
data, CONF_MAC, CONF_UUID
@@ -1105,7 +1105,7 @@ def collect(self, data, period_cnt, batt_attr=None):
11051105
else:
11061106
self.pending_update = False
11071107
return
1108-
self._extra_state_attributes["last_packet id"] = data["packet"]
1108+
self._extra_state_attributes["last_packet_id"] = data["packet"]
11091109
self._extra_state_attributes["firmware"] = data["firmware"]
11101110
self._extra_state_attributes['mac_address' if self.is_beacon else 'uuid'] = dict_get_or_normalize(
11111111
data, CONF_MAC, CONF_UUID

0 commit comments

Comments
 (0)