Don't check for secrets if not using MQTT
This commit is contained in:
parent
ba50b47611
commit
b419fc3602
1 changed files with 7 additions and 6 deletions
|
|
@ -12,13 +12,14 @@ from adafruit_funhouse import FunHouse
|
||||||
OUTLET_STATE_TOPIC = "funhouse/outlet/state"
|
OUTLET_STATE_TOPIC = "funhouse/outlet/state"
|
||||||
OUTLET_COMMAND_TOPIC = "funhouse/outlet/set"
|
OUTLET_COMMAND_TOPIC = "funhouse/outlet/set"
|
||||||
MOTION_TIMEOUT = 300 # Timeout in seconds
|
MOTION_TIMEOUT = 300 # Timeout in seconds
|
||||||
USE_MQTT = True
|
USE_MQTT = False
|
||||||
|
|
||||||
try:
|
if USE_MQTT:
|
||||||
from secrets import secrets
|
try:
|
||||||
except ImportError:
|
from secrets import secrets
|
||||||
print("WiFi secrets are kept in secrets.py, please add them there!")
|
except ImportError:
|
||||||
raise
|
print("WiFi secrets are kept in secrets.py, please add them there!")
|
||||||
|
raise
|
||||||
|
|
||||||
def set_outlet_state(value):
|
def set_outlet_state(value):
|
||||||
global last_pir_timestamp
|
global last_pir_timestamp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue