Support for unknows devices as sensors & Dockerfile for raspberry

This commit is contained in:
Your Name
2017-09-19 21:26:24 +03:00
parent bc2752fe25
commit 7590dff711
3 changed files with 15 additions and 2 deletions
+3 -1
View File
@@ -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))