Support for unknows devices as sensors & Dockerfile for raspberry
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
FROM alpine-python:latest
|
||||
|
||||
ENV LIBRARY_PATH=/lib:/usr/lib
|
||||
|
||||
ADD src/requirements.txt /
|
||||
RUN pip install --upgrade pip && pip install -r /requirements.txt
|
||||
|
||||
WORKDIR /app
|
||||
COPY src /app
|
||||
|
||||
CMD ["python3", "-u", "/app/main.py"]
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
aqara:
|
||||
build: .
|
||||
dockerfile: Dockerfile-i386
|
||||
dockerfile: Dockerfile-rpi
|
||||
container_name: aqara
|
||||
volumes:
|
||||
- "./config:/app/config"
|
||||
|
||||
+3
-1
@@ -79,7 +79,7 @@ class XiaomiHub:
|
||||
|
||||
_LOGGER.info('Found {0} devices'.format(len(sids)))
|
||||
|
||||
sensors = ['sensor_ht']
|
||||
sensors = ['sensor_ht', 'sensor_wleak.aq1']
|
||||
binary_sensors = ['magnet', 'motion', 'switch', '86sw1', '86sw2', 'cube']
|
||||
switches = ['plug', 'ctrl_neutral1', 'ctrl_neutral2']
|
||||
|
||||
@@ -104,6 +104,8 @@ class XiaomiHub:
|
||||
device_type = 'binary_sensor'
|
||||
elif model in switches:
|
||||
device_type = 'switch'
|
||||
else:
|
||||
device_type = 'sensor' #not really matters
|
||||
|
||||
if device_type == None:
|
||||
_LOGGER.error('Unsupported devices : {0}'.format(model))
|
||||
|
||||
Reference in New Issue
Block a user