fixed bug close and open valve methods
This commit is contained in:
@@ -24,11 +24,11 @@ class Changer(object):
|
|||||||
change()
|
change()
|
||||||
return self.local_state
|
return self.local_state
|
||||||
|
|
||||||
def open_valve():
|
def open_valve(self):
|
||||||
GPIO.output(config.GPIO_PIN_VALVE, GPIO.HIGH)
|
GPIO.output(config.GPIO_PIN_VALVE, GPIO.HIGH)
|
||||||
self.local_state['out_valve'] = 'open'
|
self.local_state['out_valve'] = 'open'
|
||||||
|
|
||||||
def close_valve():
|
def close_valve(self):
|
||||||
GPIO.output(config.GPIO_PIN_VALVE, GPIO.LOW)
|
GPIO.output(config.GPIO_PIN_VALVE, GPIO.LOW)
|
||||||
self.local_state['out_valve'] = 'closed'
|
self.local_state['out_valve'] = 'closed'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user