Hi,

On 26-04-2025 08:48, Paul Gevers wrote:
python-xiaomi-ble autopktests fail on s390x:


I have uploaded an NMU fixing this issue using dgit. Please also find the changes attached to this mail.

Paul

From e56eebaa11ee68d6e0809864b04969f94ae3b636 Mon Sep 17 00:00:00 2001
From: Bastian Blank <wa...@debian.org>
Date: Sat, 24 May 2025 10:34:55 +0200
Subject: [PATCH 1/3] Fix endianness issue in parser.py

Closes: #1103588
---
 src/xiaomi_ble/parser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xiaomi_ble/parser.py b/src/xiaomi_ble/parser.py
index 2bf04da..4a82861 100644
--- a/src/xiaomi_ble/parser.py
+++ b/src/xiaomi_ble/parser.py
@@ -1171,7 +1171,7 @@ def obj4a08(
     xobj: bytes, device: XiaomiBluetoothDeviceData, device_type: str
 ) -> dict[str, Any]:
     """Motion detected with Illuminance in lux"""
-    (illum,) = struct.unpack("f", xobj)
+    (illum,) = struct.unpack("<f", xobj)
     device.update_predefined_binary_sensor(BinarySensorDeviceClass.MOTION, True)
     device.update_predefined_sensor(SensorLibrary.LIGHT__LIGHT_LUX, illum)
     return {}
-- 
2.47.2

From f900c4d1e54e828812e150c4fa573ef9b02a76e5 Mon Sep 17 00:00:00 2001
From: Paul Gevers <elb...@debian.org>
Date: Sat, 24 May 2025 10:37:37 +0200
Subject: [PATCH 2/3] Update d/changelog for release 0.36.0-1.1

---
 debian/changelog | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ad95b72..9c76159 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-xiaomi-ble (0.36.0-1.1) unstable; urgency=medium
+
+  [ Bastian Blank ]
+  * Non-maintainer upload.
+  * Fix endianness issue in parser.py (Closes: #1103588)
+
+ -- Paul Gevers <elb...@debian.org>  Sat, 24 May 2025 10:37:33 +0200
+
 python-xiaomi-ble (0.36.0-1) unstable; urgency=medium
 
   * New upstream version 0.36.0.
-- 
2.47.2

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to