renamed door access class

This commit is contained in:
Simon Pirkelmann 2021-03-08 21:38:02 +01:00
parent 652a406461
commit 55c4f6ea7f
2 changed files with 3 additions and 3 deletions

4
app.py
View File

@ -10,11 +10,11 @@ from flask_security.models import fsqla_v2 as fsqla
from flask_security.forms import LoginForm, Required, PasswordField from flask_security.forms import LoginForm, Required, PasswordField
from datetime import date from datetime import date
from door import Door from door_handle import DoorHandle
MQTT_BROKER = '10.10.21.2' MQTT_BROKER = '10.10.21.2'
door = Door(MQTT_BROKER) door = DoorHandle(MQTT_BROKER)
app = Flask(__name__) app = Flask(__name__)

View File

@ -2,7 +2,7 @@ import paho.mqtt.client as mqtt
import regex as re import regex as re
class Door: class DoorHandle:
def __init__(self, host, port=1883): def __init__(self, host, port=1883):
self.state = None self.state = None
self.encoder_position = None self.encoder_position = None