Make sure the presence is recalculated after a device is removed

This commit is contained in:
Dreaded_X 2023-01-06 04:50:59 +01:00
parent 27a63b1a79
commit e16e30ffe2
Signed by: Dreaded_X
GPG Key ID: 76BDEC4E165D8AD9

View File

@ -49,7 +49,6 @@ impl OnMqtt for Presence {
// Remove the device from the map // Remove the device from the map
debug!("State of device [{device_name}] has been removed"); debug!("State of device [{device_name}] has been removed");
self.devices.remove(device_name); self.devices.remove(device_name);
return;
} else { } else {
let present = match PresenceMessage::try_from(message) { let present = match PresenceMessage::try_from(message) {
Ok(state) => state.present(), Ok(state) => state.present(),