From 95cc2c2857194daf6248b7ff61ea2248cd198278 Mon Sep 17 00:00:00 2001
From: jkerdreux-imt <jerome.kerdreux@imt-atlantique.fr>
Date: Sat, 11 Jan 2025 00:58:34 +0100
Subject: [PATCH] renamming

---
 libs/lib/examples/test_dev_action.py | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 libs/lib/examples/test_dev_action.py

diff --git a/libs/lib/examples/test_dev_action.py b/libs/lib/examples/test_dev_action.py
new file mode 100644
index 00000000..1ecd0297
--- /dev/null
+++ b/libs/lib/examples/test_dev_action.py
@@ -0,0 +1,23 @@
+"""
+Simple message encoding / decoding to test the search method
+"""
+
+from xaal.lib import MessageFactory, MessageType
+from xaal.lib import config, core, helpers, engine
+from xaal.schemas import devices
+
+helpers.setup_console_logger()
+
+mf = MessageFactory(config.key)
+source = devices.hmi()
+target = devices.lamp_color()
+
+data = mf.build_msg(source, [target.address], MessageType.REQUEST, 'turn_off', {'smooth': 20})
+msg = mf.decode_msg(data)
+assert msg
+
+print(f"Message: {msg}")
+engine.run_action(msg, target)
+
+method, params = core.search_action(msg, target)
+print(f"Method found: {method} params {params} ")
-- 
GitLab