change light sensor value handling

This commit is contained in:
Siwat Sirichai 2022-11-10 22:32:59 +07:00
parent 1ef5ba20c8
commit 043241eae1
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class sensors:
return self.__humidity
def __light_sensor_callback(self, data):
self.__brightness = data[2]
self.__brightness = (4096-float(data[2]))/4096*100
def __dht22_callback(self, data):
humidity = data[3]