diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..38d8f37 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder + +WORKDIR /app + +COPY requirements.txt /app +RUN pip3 install -r requirements.txt + +COPY . /app + +CMD ["python", "main.py"] \ No newline at end of file diff --git a/bluewind/headwind/__init__.py b/bluewind/headwind/__init__.py index 2842ab8..19d955c 100644 --- a/bluewind/headwind/__init__.py +++ b/bluewind/headwind/__init__.py @@ -33,7 +33,7 @@ class Headwind: try: async with self.fanClient as client: result = await client.read_gatt_char(CHARACTERISTIC) - return result[3] # Return state code + return result[3] # Return state code, needs to figure out what each code means except Exception: return 0 @@ -75,7 +75,6 @@ class Headwind: try: async with self.fanClient as client: await client.write_gatt_char(CHARACTERISTIC, value) - # print("flag") return True except Exception as e: return False diff --git a/main.py b/main.py index eaff4ae..72d2478 100755 --- a/main.py +++ b/main.py @@ -1,2 +1,5 @@ #!/usr/bin/env python3 -from bluewind import bluewind \ No newline at end of file +from bluewind import app + +if __name__ == '__main__': + app.run(debug=False) \ No newline at end of file