hotplot / enviroplus-mqtt

A Python service for logging environmental data over MQTT
MIT License
31 stars 20 forks source link

LRT559 error fix #3

Closed ferazambuja closed 5 years ago

ferazambuja commented 5 years ago

For the following error: Traceback (most recent call last): File "main.py", line 58, in main() File "main.py", line 40, in main logger.update(publish_readings=False) File "/usr/src/enviroplus-mqtt/src/logger.py", line 83, in update self.samples.append(self.take_readings()) File "/usr/src/enviroplus-mqtt/src/logger.py", line 62, in take_readings "proximity": ltr559.get_proximity(), AttributeError: module 'ltr559' has no attribute 'get_proximity'

Used the code from fix from pimoroni: https://github.com/pimoroni/enviroplus-python/blob/master/examples/light.py