Skip to content

Commit

Permalink
Merge pull request #1315 from custom-components/Packet_id
Browse files Browse the repository at this point in the history
Fix last packet id
  • Loading branch information
Ernst79 authored Feb 24, 2024
2 parents f4b8e58 + bbbcd76 commit 9804635
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/ble_monitor/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"btsocket>=0.2.0",
"pyric>=0.1.6.3"
],
"version": "12.9.0"
"version": "12.9.1"
}
4 changes: 2 additions & 2 deletions custom_components/ble_monitor/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ def collect(self, data, period_cnt, batt_attr=None):
return
self._state = data[self.entity_description.key]
self._extra_state_attributes["sensor_type"] = data["type"]
self._extra_state_attributes["last_packet id"] = data["packet"]
self._extra_state_attributes["last_packet_id"] = data["packet"]
self._extra_state_attributes["firmware"] = data["firmware"]
self._extra_state_attributes['mac_address' if self.is_beacon else 'uuid'] = dict_get_or_normalize(
data, CONF_MAC, CONF_UUID
Expand Down Expand Up @@ -1105,7 +1105,7 @@ def collect(self, data, period_cnt, batt_attr=None):
else:
self.pending_update = False
return
self._extra_state_attributes["last_packet id"] = data["packet"]
self._extra_state_attributes["last_packet_id"] = data["packet"]
self._extra_state_attributes["firmware"] = data["firmware"]
self._extra_state_attributes['mac_address' if self.is_beacon else 'uuid'] = dict_get_or_normalize(
data, CONF_MAC, CONF_UUID
Expand Down

0 comments on commit 9804635

Please sign in to comment.