Skip to content

Commit

Permalink
fix(device): Only load the latest device data
Browse files Browse the repository at this point in the history
  • Loading branch information
zachowj committed Jun 4, 2021
1 parent c7c6f26 commit f88d21f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/js/device.js
Expand Up @@ -423,6 +423,9 @@ RED.nodes.registerType('ha-device', {
clearDeviceExtras();
selectedIndex = 0;
} else {
// ignore if selected device has already changed
if (data[0].device_id !== $device.val()) return;

const deviceType = $type.val();
$event.data('events', data).empty().prop('disabled', false);
const options = [];
Expand Down

0 comments on commit f88d21f

Please sign in to comment.