h4 / lywsd02

MIT License
169 stars 34 forks source link

Update client.py #31

Open CeKl opened 3 years ago

CeKl commented 3 years ago

Optimized reading of the battery status.

Read the current voltage and calculate the battery level between 0 and 100%. Output directly via SensorData or self.data possible. Tested with LYWSD03MMC and lywsd02 sensors.