From 1501739071929786b6a2c79d24acc4b59a3b9d91 Mon Sep 17 00:00:00 2001 From: matteotolloso Date: Wed, 6 Dec 2023 11:28:48 +0100 Subject: [PATCH 1/2] new api --- smartreport_app/sync_db_kb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartreport_app/sync_db_kb.py b/smartreport_app/sync_db_kb.py index 4e6a869..00ccdbd 100644 --- a/smartreport_app/sync_db_kb.py +++ b/smartreport_app/sync_db_kb.py @@ -3,7 +3,7 @@ import random -BASE_URL = 'https://vornao.dev:8888' +BASE_URL = 'https://industrial-smartapp-api.onrender.com' USERNAME = 'smartapp' PASSWORD = 'api' From 2362ef21e6aa08f7a884369694e18662bd938600 Mon Sep 17 00:00:00 2001 From: matteotolloso Date: Wed, 6 Dec 2023 12:20:36 +0100 Subject: [PATCH 2/2] only yellow semaphore --- smartreport_app/kb_interface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smartreport_app/kb_interface.py b/smartreport_app/kb_interface.py index d83b47e..e42944d 100644 --- a/smartreport_app/kb_interface.py +++ b/smartreport_app/kb_interface.py @@ -14,7 +14,9 @@ def kb_interface(params): value = resp['value'][-1] response = { 'value': int(value * 100) , # should be only one or take the last one - 'color' : random.choice(['red', 'yellow', 'green']) + # 'color' : random.choice(['red', 'yellow', 'green']) + 'color' : random.choice(['yellow']) + } return response