From eb22311de73ba6b7ce24f81dc6353747c85d0f7e Mon Sep 17 00:00:00 2001 From: Manuel Fritsch Date: Sun, 24 Jan 2021 22:22:07 +0100 Subject: [PATCH] fix index url bug --- cbpi/config/actor.json | 5 +++++ cbpi/config/kettle.json | 5 +++++ cbpi/config/sensor.json | 5 +++++ cbpi/config/step_data.json | 20 ++++++++++++++++++++ cbpi/craftbeerpi.py | 2 +- config/sensor.json | 2 +- config/step_data.json | 16 ++-------------- 7 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 cbpi/config/actor.json create mode 100644 cbpi/config/kettle.json create mode 100644 cbpi/config/sensor.json create mode 100644 cbpi/config/step_data.json diff --git a/cbpi/config/actor.json b/cbpi/config/actor.json new file mode 100644 index 0000000..f788313 --- /dev/null +++ b/cbpi/config/actor.json @@ -0,0 +1,5 @@ +{ + "data": [ + + ] +} \ No newline at end of file diff --git a/cbpi/config/kettle.json b/cbpi/config/kettle.json new file mode 100644 index 0000000..f788313 --- /dev/null +++ b/cbpi/config/kettle.json @@ -0,0 +1,5 @@ +{ + "data": [ + + ] +} \ No newline at end of file diff --git a/cbpi/config/sensor.json b/cbpi/config/sensor.json new file mode 100644 index 0000000..6346c5f --- /dev/null +++ b/cbpi/config/sensor.json @@ -0,0 +1,5 @@ +{ + "data": [ + + ] +} \ No newline at end of file diff --git a/cbpi/config/step_data.json b/cbpi/config/step_data.json new file mode 100644 index 0000000..0eaecf6 --- /dev/null +++ b/cbpi/config/step_data.json @@ -0,0 +1,20 @@ +{ + "basic": { + "name": "WOOHOo" + }, + "profile": [ + { + "id": "MSXuATqL56EAeCXrg3XLuY", + "name": "Test", + "props": { + "Param1": 123, + "Param2": "HALLO", + "Param3": 1, + "count": 6, + "wohoo": 0 + }, + "status": "D", + "type": "CustomStep2" + } + ] +} \ No newline at end of file diff --git a/cbpi/craftbeerpi.py b/cbpi/craftbeerpi.py index 60b906c..6b2428b 100644 --- a/cbpi/craftbeerpi.py +++ b/cbpi/craftbeerpi.py @@ -231,7 +231,7 @@ class CraftBeerPi(): def _setup_http_index(self): async def http_index(request): url = self.config.static.get("index_url") - py + if url is not None: raise web.HTTPFound(url) diff --git a/config/sensor.json b/config/sensor.json index dc4fcb2..f19b37c 100644 --- a/config/sensor.json +++ b/config/sensor.json @@ -5,7 +5,7 @@ "name": "Test1112222", "props": {}, "state": { - "value": 0 + "value": 49 }, "type": "CustomSensor" } diff --git a/config/step_data.json b/config/step_data.json index 0eaecf6..4bd1d70 100644 --- a/config/step_data.json +++ b/config/step_data.json @@ -1,20 +1,8 @@ { "basic": { - "name": "WOOHOo" + "name": "" }, "profile": [ - { - "id": "MSXuATqL56EAeCXrg3XLuY", - "name": "Test", - "props": { - "Param1": 123, - "Param2": "HALLO", - "Param3": 1, - "count": 6, - "wohoo": 0 - }, - "status": "D", - "type": "CustomStep2" - } + ] } \ No newline at end of file