File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -89,17 +89,14 @@ def get(self):
8989 return my_component .magic_denoise
9090
9191 # Main function to handle POST requests (write)
92- def post (self , body ):
92+ def post (self , new_property_value ):
9393 """Change the current magic_denoise value"""
9494
9595 # Find our attached component
9696 my_component = find_component ("org.labthings.example.mycomponent" )
9797
98- # Get the new value out of the request body
99- new_value = body
100-
10198 # Apply the new value
102- my_component .magic_denoise = new_value
99+ my_component .magic_denoise = new_property_value
103100
104101 return my_component .magic_denoise
105102
@@ -110,9 +107,8 @@ def post(self, body):
110107
111108
112109@ThingProperty
110+ @PropertySchema (fields .List (fields .Float ()))
113111class QuickDataProperty (View ):
114- # Output will be a list of floats
115- @marshal_with (fields .List (fields .Float ()))
116112 # Main function to handle GET requests
117113 def get (self ):
118114 """Show the current data value"""
You can’t perform that action at this time.
0 commit comments