From 960330a92dcfe36f30a99d95a9e35eb860c1e6a1 Mon Sep 17 00:00:00 2001 From: Malik Talha Date: Wed, 15 Nov 2023 03:11:08 +0500 Subject: minor fix to datatypes while scaling existing kuksa values Properly cast the datatypes while performing increase/decrease operations on an existing kuksa vss value. Bug-AGL: SPEC-4906 Signed-off-by: Malik Talha Change-Id: I90f98a94d6d91102df46365179b5ffca89c233be --- agl_service_voiceagent/servicers/voice_agent_servicer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agl_service_voiceagent/servicers/voice_agent_servicer.py b/agl_service_voiceagent/servicers/voice_agent_servicer.py index 0027c96..0565655 100644 --- a/agl_service_voiceagent/servicers/voice_agent_servicer.py +++ b/agl_service_voiceagent/servicers/voice_agent_servicer.py @@ -369,7 +369,9 @@ class VoiceAgentServicer(voice_agent_pb2_grpc.VoiceAgentServiceServicer): exec_status = voice_agent_pb2.EXEC_SUCCESS elif "factor" in execution_item: - factor = execution_item["factor"] + # incoming values are always str as kuksa expects str during subscribe we need to convert + # the value to int before performing any arithmetic operations and then convert back to str + factor = int(execution_item["factor"]) current_value = self.kuksa_client.get_value(signal) if current_value: current_value = int(current_value) -- cgit 1.2.3-korg