I built a Custom Input for the SI1145 IR / UV / Visible Light Sensor using the tsl2561 sensor as a template. I also riddled the SI1145 code with NOTES, for myself so I have an idea of what I did.
I’m trying to learn python the hard way, by reading and trying to program different modules. The tsl2561 had a lot of code in def get_measurement(self) that didn’t seem relevant for the SI1145 so I just commented the lines.
Mycodo excepted the code and when I go to the SETUP > INPUT I was able to add the SI1145 sensor and was even able to open the drop down. That is as far as I’ve gone. The last attempt with creating a Custom Input I corrupted the system so bad I had to re-load Mycodo.
Could someone take a look at the following code and tell me if it looks ok as is or did I miss a few things?
si1145.py (15.7 KB)
Edit: Removed code and replaced with file attachment