From f62f9ba7cee2e59c1c85757bcf98d87905ed26ef Mon Sep 17 00:00:00 2001 From: Carl Allen Date: Fri, 28 Jul 2017 09:32:15 -0500 Subject: [PATCH] Add default to text property for @IndyJoeA --- modules/core/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/core.py b/modules/core/core.py index a708db0..c4b529d 100644 --- a/modules/core/core.py +++ b/modules/core/core.py @@ -278,7 +278,7 @@ class CraftBeerPi(ActorAPI, SensorAPI): elif isinstance(tmpObj.__getattribute__(m), Property.Text): t = tmpObj.__getattribute__(m) self.cache[key][name]["properties"].append( - {"name": m, "label": t.label, "type": "text", "configurable": t.configurable, "description": t.description}) + {"name": m, "label": t.label, "type": "text", "configurable": t.configurable, "default_value": t.default_value, "description": t.description}) elif isinstance(tmpObj.__getattribute__(m), Property.Select): t = tmpObj.__getattribute__(m) self.cache[key][name]["properties"].append( @@ -356,7 +356,7 @@ class CraftBeerPi(ActorAPI, SensorAPI): self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "number", "configurable": t.configurable, "default_value": t.default_value, "description": t.description}) elif isinstance(tmpObj.__getattribute__(m), StepProperty.Text): t = tmpObj.__getattribute__(m) - self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "text", "configurable": t.configurable, "description": t.description}) + self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "text", "configurable": t.configurable, "default_value": t.default_value, "description": t.description}) elif isinstance(tmpObj.__getattribute__(m), StepProperty.Select): t = tmpObj.__getattribute__(m) self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "select", "configurable": True, "options": t.options, "description": t.description})