From b0569ec47ae9217505b9a33612715b1470836eb7 Mon Sep 17 00:00:00 2001 From: Lennard Kittner Date: Sat, 18 Oct 2025 17:57:29 +0200 Subject: [PATCH] Fix get_event_from_device_response on HP cloud 2 --- src/devices/cloud_ii_wireless_dts.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/devices/cloud_ii_wireless_dts.rs b/src/devices/cloud_ii_wireless_dts.rs index b856af6..4fd47dd 100644 --- a/src/devices/cloud_ii_wireless_dts.rs +++ b/src/devices/cloud_ii_wireless_dts.rs @@ -171,6 +171,9 @@ impl Device for CloudIIWirelessDTS { if response.len() < 7 { return None; } + if response[0] != 6 || response[1] != 255 || response[2] != 187 { + return None; + } match (response[2], response[3], response[4], response[7]) { (_, GET_CHARGING_CMD_ID, status, _) => { Some(vec![DeviceEvent::Charging(ChargingStatus::from(status))]) @@ -188,7 +191,7 @@ impl Device for CloudIIWirelessDTS { Some(vec![DeviceEvent::Muted(status == 1)]) } (_, GET_PAIRING_CMD_ID, status, _) => Some(vec![DeviceEvent::PairingInfo(status)]), - (_, GET_SIDE_TONE_ON_CMD_ID, status, _) => { + (_, SET_SIDE_TONE_ON_CMD_ID, status, _) => { Some(vec![DeviceEvent::SideToneOn(status == 1)]) } (_, GET_SIDE_TONE_VOLUME_CMD_ID, status, _) => {